mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smar...@apache.org
Subject svn commit: r1491329 - /mahout/trunk/core/src/main/java/org/apache/mahout/clustering/topdown/postprocessor/ClusterOutputPostProcessor.java
Date Mon, 10 Jun 2013 02:40:26 GMT
Author: smarthi
Date: Mon Jun 10 02:40:26 2013
New Revision: 1491329

URL: http://svn.apache.org/r1491329
Log:
MAHOUT-1103: properly partition the data for MapReduce - code cleanup based on review, instantiate
Maps with Maps.newHashMap()

Modified:
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/topdown/postprocessor/ClusterOutputPostProcessor.java

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/clustering/topdown/postprocessor/ClusterOutputPostProcessor.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/topdown/postprocessor/ClusterOutputPostProcessor.java?rev=1491329&r1=1491328&r2=1491329&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/clustering/topdown/postprocessor/ClusterOutputPostProcessor.java
(original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/clustering/topdown/postprocessor/ClusterOutputPostProcessor.java
Mon Jun 10 02:40:26 2013
@@ -17,6 +17,7 @@
 
 package org.apache.mahout.clustering.topdown.postprocessor;
 
+import com.google.common.collect.Maps;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -34,7 +35,6 @@ import org.apache.mahout.common.iterator
 import org.apache.mahout.math.VectorWritable;
 
 import java.io.IOException;
-import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -53,7 +53,7 @@ public final class ClusterOutputPostProc
   private final FileSystem fileSystem;
   private final Configuration conf;
   private final Path clusterPostProcessorOutput;
-  private final Map<String, Path> postProcessedClusterDirectories = new HashMap<String,
Path>();
+  private final Map<String, Path> postProcessedClusterDirectories = Maps.newHashMap();
   private long uniqueVectorId = 0L;
   private final Map<String, SequenceFile.Writer> writersForClusters;
 
@@ -63,7 +63,7 @@ public final class ClusterOutputPostProc
     this.clusterPostProcessorOutput = output;
     this.clusteredPoints = PathDirectory.getClusterOutputClusteredPoints(clusterOutputToBeProcessed);
     this.conf = hadoopConfiguration;
-    this.writersForClusters = new HashMap<String, SequenceFile.Writer>();
+    this.writersForClusters = Maps.newHashMap();
     fileSystem = clusteredPoints.getFileSystem(conf);
   }
 



Mime
View raw message