[17/39] hive git commit: HIVE-13519: Allow LlapRecordReader to parse/output rows
HIVE-13519: Allow LlapRecordReader to parse/output rows Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/fc7343dd Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/fc7343dd Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/fc7343dd Branch: refs/heads/master Commit: fc7343dd12ac152267615e6ac67238ee06326452 Parents: 8f6b28a Author: Jason DereAuthored: Thu Apr 14 14:30:45 2016 -0700 Committer: Jason Dere Committed: Thu Apr 14 14:30:45 2016 -0700 -- .../hadoop/hive/jdbc/TestLlapInputSplit.java| 21 +- .../apache/hive/jdbc/TestJdbcWithMiniLlap.java | 38 ++-- jdbc/pom.xml| 5 + .../apache/hive/jdbc/LlapBaseInputFormat.java | 135 .../src/java/org/apache/hive/jdbc/LlapDump.java | 11 +- .../org/apache/hive/jdbc/LlapInputFormat.java | 135 .../apache/hive/jdbc/LlapRowInputFormat.java| 34 +++ llap-common/pom.xml | 21 ++ .../org/apache/hadoop/hive/llap/FieldDesc.java | 63 ++ .../hadoop/hive/llap/LlapRowRecordReader.java | 155 ++ .../java/org/apache/hadoop/hive/llap/Row.java | 166 +++ .../org/apache/hadoop/hive/llap/Schema.java | 76 +++ .../org/apache/hadoop/hive/llap/TypeDesc.java | 108 ++ .../org/apache/hadoop/hive/llap/TestRow.java| 92 + .../hadoop/hive/llap/LlapInputFormat.java | 27 ++- .../hadoop/hive/llap/LlapBaseRecordReader.java | 205 ++ .../apache/hadoop/hive/llap/LlapInputSplit.java | 27 +-- .../hadoop/hive/llap/LlapRecordReader.java | 206 --- .../ql/udf/generic/GenericUDTFGetSplits.java| 87 +++- .../hadoop/hive/llap/TestLlapOutputFormat.java | 6 +- 20 files changed, 1205 insertions(+), 413 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hive/blob/fc7343dd/itests/hive-unit/src/test/java/org/apache/hadoop/hive/jdbc/TestLlapInputSplit.java -- diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/jdbc/TestLlapInputSplit.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/jdbc/TestLlapInputSplit.java index 338930e..366e326 100644 --- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/jdbc/TestLlapInputSplit.java +++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/jdbc/TestLlapInputSplit.java @@ -10,8 +10,10 @@ import java.util.HashMap; import org.apache.hadoop.io.Text; -import org.apache.hadoop.hive.metastore.api.FieldSchema; -import org.apache.hadoop.hive.metastore.api.Schema; +import org.apache.hadoop.hive.llap.Schema; +import org.apache.hadoop.hive.llap.FieldDesc; +import org.apache.hadoop.hive.llap.TypeDesc; + import org.apache.hadoop.mapred.SplitLocationInfo; import org.junit.After; import org.junit.Before; @@ -32,14 +34,11 @@ public class TestLlapInputSplit { new SplitLocationInfo("location1", false), new SplitLocationInfo("location2", false), }; -ArrayList fields = new ArrayList(); -fields.add(new FieldSchema("col1", "string", "comment1")); -fields.add(new FieldSchema("col2", "int", "comment2")); -HashMap properties = new HashMap (); -properties.put("key1", "val1"); -Schema schema = new Schema( -fields, -properties); + +ArrayList colDescs = new ArrayList(); +colDescs.add(new FieldDesc("col1", new TypeDesc(TypeDesc.Type.STRING))); +colDescs.add(new FieldDesc("col2", new TypeDesc(TypeDesc.Type.INT))); +Schema schema = new Schema(colDescs); org.apache.hadoop.hive.llap.LlapInputSplit split1 = new org.apache.hadoop.hive.llap.LlapInputSplit( splitNum, @@ -94,7 +93,7 @@ public class TestLlapInputSplit { assertEquals(locationInfo1[idx].isOnDisk(), locationInfo2[idx].isOnDisk()); } assertArrayEquals(split1.getLocations(), split2.getLocations()); -assertEquals(split1.getSchema(), split2.getSchema()); +assertEquals(split1.getSchema().toString(), split2.getSchema().toString()); assertEquals(split1.getLlapUser(), split2.getLlapUser()); } http://git-wip-us.apache.org/repos/asf/hive/blob/fc7343dd/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlap.java -- diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlap.java b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlap.java index 98daab4..deeac2e 100644 --- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlap.java +++ b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlap.java @@ -60,16 +60,16 @@
hive git commit: HIVE-13519: Allow LlapRecordReader to parse/output rows
Repository: hive Updated Branches: refs/heads/llap 8f6b28a38 -> fc7343dd1 HIVE-13519: Allow LlapRecordReader to parse/output rows Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/fc7343dd Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/fc7343dd Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/fc7343dd Branch: refs/heads/llap Commit: fc7343dd12ac152267615e6ac67238ee06326452 Parents: 8f6b28a Author: Jason DereAuthored: Thu Apr 14 14:30:45 2016 -0700 Committer: Jason Dere Committed: Thu Apr 14 14:30:45 2016 -0700 -- .../hadoop/hive/jdbc/TestLlapInputSplit.java| 21 +- .../apache/hive/jdbc/TestJdbcWithMiniLlap.java | 38 ++-- jdbc/pom.xml| 5 + .../apache/hive/jdbc/LlapBaseInputFormat.java | 135 .../src/java/org/apache/hive/jdbc/LlapDump.java | 11 +- .../org/apache/hive/jdbc/LlapInputFormat.java | 135 .../apache/hive/jdbc/LlapRowInputFormat.java| 34 +++ llap-common/pom.xml | 21 ++ .../org/apache/hadoop/hive/llap/FieldDesc.java | 63 ++ .../hadoop/hive/llap/LlapRowRecordReader.java | 155 ++ .../java/org/apache/hadoop/hive/llap/Row.java | 166 +++ .../org/apache/hadoop/hive/llap/Schema.java | 76 +++ .../org/apache/hadoop/hive/llap/TypeDesc.java | 108 ++ .../org/apache/hadoop/hive/llap/TestRow.java| 92 + .../hadoop/hive/llap/LlapInputFormat.java | 27 ++- .../hadoop/hive/llap/LlapBaseRecordReader.java | 205 ++ .../apache/hadoop/hive/llap/LlapInputSplit.java | 27 +-- .../hadoop/hive/llap/LlapRecordReader.java | 206 --- .../ql/udf/generic/GenericUDTFGetSplits.java| 87 +++- .../hadoop/hive/llap/TestLlapOutputFormat.java | 6 +- 20 files changed, 1205 insertions(+), 413 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hive/blob/fc7343dd/itests/hive-unit/src/test/java/org/apache/hadoop/hive/jdbc/TestLlapInputSplit.java -- diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/jdbc/TestLlapInputSplit.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/jdbc/TestLlapInputSplit.java index 338930e..366e326 100644 --- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/jdbc/TestLlapInputSplit.java +++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/jdbc/TestLlapInputSplit.java @@ -10,8 +10,10 @@ import java.util.HashMap; import org.apache.hadoop.io.Text; -import org.apache.hadoop.hive.metastore.api.FieldSchema; -import org.apache.hadoop.hive.metastore.api.Schema; +import org.apache.hadoop.hive.llap.Schema; +import org.apache.hadoop.hive.llap.FieldDesc; +import org.apache.hadoop.hive.llap.TypeDesc; + import org.apache.hadoop.mapred.SplitLocationInfo; import org.junit.After; import org.junit.Before; @@ -32,14 +34,11 @@ public class TestLlapInputSplit { new SplitLocationInfo("location1", false), new SplitLocationInfo("location2", false), }; -ArrayList fields = new ArrayList(); -fields.add(new FieldSchema("col1", "string", "comment1")); -fields.add(new FieldSchema("col2", "int", "comment2")); -HashMap properties = new HashMap (); -properties.put("key1", "val1"); -Schema schema = new Schema( -fields, -properties); + +ArrayList colDescs = new ArrayList(); +colDescs.add(new FieldDesc("col1", new TypeDesc(TypeDesc.Type.STRING))); +colDescs.add(new FieldDesc("col2", new TypeDesc(TypeDesc.Type.INT))); +Schema schema = new Schema(colDescs); org.apache.hadoop.hive.llap.LlapInputSplit split1 = new org.apache.hadoop.hive.llap.LlapInputSplit( splitNum, @@ -94,7 +93,7 @@ public class TestLlapInputSplit { assertEquals(locationInfo1[idx].isOnDisk(), locationInfo2[idx].isOnDisk()); } assertArrayEquals(split1.getLocations(), split2.getLocations()); -assertEquals(split1.getSchema(), split2.getSchema()); +assertEquals(split1.getSchema().toString(), split2.getSchema().toString()); assertEquals(split1.getLlapUser(), split2.getLlapUser()); } http://git-wip-us.apache.org/repos/asf/hive/blob/fc7343dd/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlap.java -- diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlap.java b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlap.java index 98daab4..deeac2e 100644 --- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlap.java +++