crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwi...@apache.org
Subject git commit: CRUNCH-125: Maintain backward compatibility with older versions of KeyValueTextInputFormat
Date Wed, 19 Dec 2012 20:36:15 GMT
Updated Branches:
  refs/heads/master 1ee3a70dc -> 80654bbb3


CRUNCH-125: Maintain backward compatibility with older versions of KeyValueTextInputFormat

Signed-off-by: Josh Wills <jwills@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crunch/commit/80654bbb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crunch/tree/80654bbb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crunch/diff/80654bbb

Branch: refs/heads/master
Commit: 80654bbb319fe9c07e2b290f400ce49a9c07cec9
Parents: 1ee3a70
Author: Josh Wills <jwills@apache.org>
Authored: Tue Dec 4 16:48:17 2012 -0800
Committer: Josh Wills <jwills@apache.org>
Committed: Wed Dec 19 12:33:44 2012 -0800

----------------------------------------------------------------------
 .../apache/crunch/io/text/TextFileTableSource.java |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/80654bbb/crunch/src/main/java/org/apache/crunch/io/text/TextFileTableSource.java
----------------------------------------------------------------------
diff --git a/crunch/src/main/java/org/apache/crunch/io/text/TextFileTableSource.java b/crunch/src/main/java/org/apache/crunch/io/text/TextFileTableSource.java
index 23cda77..e3c4cd5 100644
--- a/crunch/src/main/java/org/apache/crunch/io/text/TextFileTableSource.java
+++ b/crunch/src/main/java/org/apache/crunch/io/text/TextFileTableSource.java
@@ -27,7 +27,6 @@ import org.apache.crunch.io.impl.FileTableSourceImpl;
 import org.apache.crunch.types.PTableType;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.mapreduce.lib.input.KeyValueLineRecordReader;
 import org.apache.hadoop.mapreduce.lib.input.KeyValueTextInputFormat;
 
 /** 
@@ -38,9 +37,15 @@ import org.apache.hadoop.mapreduce.lib.input.KeyValueTextInputFormat;
 public class TextFileTableSource<K, V> extends FileTableSourceImpl<K, V>
     implements ReadableSource<Pair<K, V>> {
 
+  // CRUNCH-125: Maintain compatibility with both versions of the KeyValueTextInputFormat's
+  // configuration field for specifying the separator character.
+  private static final String OLD_KV_SEP = "key.value.separator.in.input.line";
+  private static final String NEW_KV_SEP = "mapreduce.input.keyvaluelinerecordreader.key.value.separator";
+  
   private static InputBundle getBundle(String sep) {
     InputBundle bundle = new InputBundle(KeyValueTextInputFormat.class);
-    bundle.set(KeyValueLineRecordReader.KEY_VALUE_SEPERATOR, sep);
+    bundle.set(OLD_KV_SEP, sep);
+    bundle.set(NEW_KV_SEP, sep);
     return bundle;
   }
   


Mime
View raw message