You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hama.apache.org by ed...@apache.org on 2011/12/12 08:48:05 UTC

svn commit: r1213160 - /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java

Author: edwardyoon
Date: Mon Dec 12 07:48:05 2011
New Revision: 1213160

URL: http://svn.apache.org/viewvc?rev=1213160&view=rev
Log:
Add getPartitionName() method

Modified:
    incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java

Modified: incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java?rev=1213160&r1=1213159&r2=1213160&view=diff
==============================================================================
--- incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java (original)
+++ incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java Mon Dec 12 07:48:05 2011
@@ -423,7 +423,7 @@ public class BSPJobClient extends Config
 
       try {
         for (int i = 0; i < numOfTasks; i++) {
-          Path p = new Path(partitionedPath, "part-" + i);
+          Path p = new Path(partitionedPath, getPartitionName(i));
           if (codec == null) {
             writers.add(SequenceFile.createWriter(fs, job.getConf(), p,
                 sampleReader.createKey().getClass(), sampleReader.createValue()
@@ -461,6 +461,10 @@ public class BSPJobClient extends Config
     return job;
   }
 
+  private String getPartitionName(int i) {
+    return "part-"  + String.valueOf(100000 + i).substring(1, 6);
+  }
+
   /**
    * Get the {@link CompressionType} for the output {@link SequenceFile}.
    *