You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ja...@apache.org on 2014/12/16 17:58:39 UTC

sqoop git commit: SQOOP-1900: Fix the SqoopWritable read/ write method to delegate the toIDF methods

Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 43160f72d -> ecf7f4469


SQOOP-1900: Fix the SqoopWritable read/ write method to delegate the toIDF methods

(Veena Basavaraj via Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/ecf7f446
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/ecf7f446
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/ecf7f446

Branch: refs/heads/sqoop2
Commit: ecf7f4469abafae341642c0d31715977cc61bc41
Parents: 43160f7
Author: Jarek Jarcec Cecho <ja...@apache.org>
Authored: Tue Dec 16 08:58:17 2014 -0800
Committer: Jarek Jarcec Cecho <ja...@apache.org>
Committed: Tue Dec 16 08:58:17 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/sqoop/job/io/SqoopWritable.java | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/ecf7f446/execution/mapreduce/src/main/java/org/apache/sqoop/job/io/SqoopWritable.java
----------------------------------------------------------------------
diff --git a/execution/mapreduce/src/main/java/org/apache/sqoop/job/io/SqoopWritable.java b/execution/mapreduce/src/main/java/org/apache/sqoop/job/io/SqoopWritable.java
index ed182cb..6a0bfa4 100644
--- a/execution/mapreduce/src/main/java/org/apache/sqoop/job/io/SqoopWritable.java
+++ b/execution/mapreduce/src/main/java/org/apache/sqoop/job/io/SqoopWritable.java
@@ -49,18 +49,26 @@ public class SqoopWritable implements Configurable, WritableComparable<SqoopWrit
     this.toIDF.setCSVTextData(data);
   }
 
-  public String getString() { return toIDF.getCSVTextData(); }
+  public String getString() {
+    return toIDF.getCSVTextData();
+  }
 
   @Override
   public void write(DataOutput out) throws IOException {
-    out.writeUTF(toIDF.getCSVTextData());
+    //delegate
+    toIDF.write(out);
   }
 
   @Override
-  public void readFields(DataInput in) throws IOException { toIDF.setCSVTextData(in.readUTF()); }
+  public void readFields(DataInput in) throws IOException {
+    //delegate
+    toIDF.read(in);
+  }
 
   @Override
-  public int compareTo(SqoopWritable o) { return getString().compareTo(o.getString()); }
+  public int compareTo(SqoopWritable o) {
+    return getString().compareTo(o.getString());
+  }
 
   @Override
   public String toString() {