hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1409609 - /hama/trunk/core/src/main/java/org/apache/hama/bsp/FileInputFormat.java
Date Thu, 15 Nov 2012 00:22:14 GMT
Author: edwardyoon
Date: Thu Nov 15 00:22:13 2012
New Revision: 1409609

URL: http://svn.apache.org/viewvc?rev=1409609&view=rev
Log:
small patch

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

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/FileInputFormat.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/FileInputFormat.java?rev=1409609&r1=1409608&r2=1409609&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/FileInputFormat.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/FileInputFormat.java Thu Nov 15 00:22:13
2012
@@ -272,7 +272,8 @@ public abstract class FileInputFormat<K,
   }
 
   protected long computeGoalSize(int numSplits, long totalSize) {
-    return totalSize / (numSplits == 0 ? 1 : numSplits);
+    // The minus 1 is for the remainder.
+    return totalSize / (numSplits <= 1 ? 1 : numSplits - 1);
   }
 
   protected long computeSplitSize(long goalSize, long minSize, long blockSize) {



Mime
View raw message