mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r894872 - /lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java
Date Thu, 31 Dec 2009 15:54:47 GMT
Author: gsingers
Date: Thu Dec 31 15:54:47 2009
New Revision: 894872

URL: http://svn.apache.org/viewvc?rev=894872&view=rev
Log:
MAHOUT-163: sort the cluster ids for output (sort is by string, not by int)

Modified:
    lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java

Modified: lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java?rev=894872&r1=894871&r2=894872&view=diff
==============================================================================
--- lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java
(original)
+++ lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java
Thu Dec 31 15:54:47 2009
@@ -54,6 +54,8 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeMap;
 import java.util.regex.Pattern;
 
 public final class ClusterDumper {
@@ -253,7 +255,7 @@
   }
 
   private static Map<String, List<String>> readPoints(String pointsPathDir, JobConf
conf) throws IOException {
-    Map<String, List<String>> result = new HashMap<String, List<String>>();
+    SortedMap<String, List<String>> result = new TreeMap<String, List<String>>();
     
     File[] children = new File(pointsPathDir).listFiles(new FilenameFilter(){
       @Override



Mime
View raw message