hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1679481 - in /hama/trunk/core/src: main/java/org/apache/hama/bsp/BSPJobClient.java test/java/org/apache/hama/bsp/TestKeyValueTextInputFormat.java
Date Fri, 15 May 2015 00:15:38 GMT
Author: edwardyoon
Date: Fri May 15 00:15:38 2015
New Revision: 1679481

URL: http://svn.apache.org/r1679481
Log:
Fix build fails

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=1679481&r1=1679480&r2=1679481&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 Fri May 15 00:15:38
2015
@@ -581,8 +581,7 @@ public class BSPJobClient extends Config
 
         // set partitionID to rawSplit
         if (split.getClass().getName().equals(FileSplit.class.getName())
-            && job.getConfiguration().get(Constants.RUNTIME_PARTITIONING_CLASS) !=
null
-            && job.get("bsp.partitioning.runner.job") == null) {
+            && job.getBoolean("input.has.partitioned", false)) {
           String[] extractPartitionID = ((FileSplit) split).getPath().getName().split("[-]");
           if(extractPartitionID.length > 1)
             rawSplit.setPartitionID(Integer.parseInt(extractPartitionID[1]));
@@ -1132,6 +1131,7 @@ public class BSPJobClient extends Config
       splitClass = Text.readString(in);
       dataLength = in.readLong();
       bytes.readFields(in);
+      partitionID = in.readInt();
       int len = WritableUtils.readVInt(in);
       locations = new String[len];
       for (int i = 0; i < len; ++i) {
@@ -1144,6 +1144,7 @@ public class BSPJobClient extends Config
       Text.writeString(out, splitClass);
       out.writeLong(dataLength);
       bytes.write(out);
+      out.writeInt(partitionID);
       WritableUtils.writeVInt(out, locations.length);
       for (String location : locations) {
         Text.writeString(out, location);

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=1679481&r1=1679480&r2=1679481&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 Fri
May 15 00:15:38 2015
@@ -78,7 +78,6 @@ 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