Permalink
Please sign in to comment.
Browse files
[Bug 4730055] Backwards compatibility with Hadoop 0.20.x. Use Base64
from net.iharder 2.3.8 to avoid issues with Hadoop using the same package (common-codecs). Munge for non-secure Hadoop support (preprocessor), add '-Dhadoop=non_secure' for unsecure Hadoop. Backward compatible changes provided by ckunz and committed by aching. git-svn-id: https://svn.apache.org/repos/asf/incubator/giraph/trunk@1161943 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information...
Showing
with
196 additions
and 48 deletions.
- +22 −8 README
- +60 −3 pom.xml
- +1 −1 src/main/java/org/apache/giraph/bsp/BspOutputFormat.java
- +29 −0 src/main/java/org/apache/giraph/bsp/BspRecordWriter.java
- +8 −2 src/main/java/org/apache/giraph/bsp/ImmutableOutputCommitter.java
- +7 −1 src/main/java/org/apache/giraph/comm/CommunicationsInterface.java
- +41 −10 src/main/java/org/apache/giraph/comm/RPCCommunications.java
- +5 −5 src/main/java/org/apache/giraph/graph/BspServiceMaster.java
- +4 −5 src/main/java/org/apache/giraph/graph/BspServiceWorker.java
- +1 −0 src/main/java/org/apache/giraph/graph/GiraphJob.java
- +4 −3 src/main/java/org/apache/giraph/graph/VertexRange.java
- +8 −6 src/main/java/org/apache/giraph/lib/JsonBase64VertexInputFormat.java
- +6 −4 src/main/java/org/apache/giraph/lib/JsonBase64VertexOutputFormat.java
@@ -0,0 +1,29 @@ | ||
+package org.apache.giraph.bsp; | ||
+ | ||
+import java.io.IOException; | ||
+ | ||
+import org.apache.hadoop.io.Text; | ||
+import org.apache.hadoop.mapreduce.RecordWriter; | ||
+import org.apache.hadoop.mapreduce.TaskAttemptContext; | ||
+ | ||
+/** | ||
+ * Used by {@link BspOutputFormat} since some versions of Hadoop | ||
+ * require that a RecordWriter is returned from getRecordWriter. | ||
+ * Does nothing, except insures that write is never called. | ||
+ */ | ||
+public class BspRecordWriter extends RecordWriter<Text, Text> { | ||
+ | ||
+ @Override | ||
+ public void close(TaskAttemptContext context) | ||
+ throws IOException, InterruptedException { | ||
+ // Do nothing | ||
+ } | ||
+ | ||
+ @Override | ||
+ public void write(Text key, Text value) | ||
+ throws IOException, InterruptedException { | ||
+ throw new IOException("write: Cannot write with " + | ||
+ getClass().getName() + | ||
+ ". Should never be called"); | ||
+ } | ||
+} |

Oops, something went wrong.
0 comments on commit
231c5a3