hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1679362 - in /hama/trunk/core/src: main/java/org/apache/hama/bsp/BSPJobClient.java test/java/org/apache/hama/bsp/TestKeyValueTextInputFormat.java
Date Thu, 14 May 2015 13:23:15 GMT
Author: edwardyoon
Date: Thu May 14 13:23:15 2015
New Revision: 1679362

URL: http://svn.apache.org/r1679362
Log: (empty)

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

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java?rev=1679362&r1=1679361&r2=1679362&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java Thu May 14 13:23:15
2015
@@ -584,7 +584,8 @@ public class BSPJobClient extends Config
             && job.getConfiguration().get(Constants.RUNTIME_PARTITIONING_CLASS) !=
null
             && job.get("bsp.partitioning.runner.job") == null) {
           String[] extractPartitionID = ((FileSplit) split).getPath().getName().split("[-]");
-          rawSplit.setPartitionID(Integer.parseInt(extractPartitionID[1]));
+          if(extractPartitionID.length > 1)
+            rawSplit.setPartitionID(Integer.parseInt(extractPartitionID[1]));
         }
 
         rawSplit.setClassName(split.getClass().getName());

Modified: hama/trunk/core/src/test/java/org/apache/hama/bsp/TestKeyValueTextInputFormat.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/test/java/org/apache/hama/bsp/TestKeyValueTextInputFormat.java?rev=1679362&r1=1679361&r2=1679362&view=diff
==============================================================================
--- hama/trunk/core/src/test/java/org/apache/hama/bsp/TestKeyValueTextInputFormat.java (original)
+++ hama/trunk/core/src/test/java/org/apache/hama/bsp/TestKeyValueTextInputFormat.java Thu
May 14 13:23:15 2015
@@ -78,6 +78,7 @@ public class TestKeyValueTextInputFormat
 
         int expectedPeerId = Math.abs(key.hashCode() % numTasks);
 
+        System.out.println(peer.getPeerName() + ", " + key + ", " + value + ", " + expectedPeerId);
         if (expectedPeerId == peer.getPeerIndex()) {
           expectedKeys.put(new Text(key), new Text(value));
         } else {



Mime
View raw message