Re: Review Request 51695: HIVE-5867: JDBC driver and beeline should support executing an initial SQL script

2016-09-21 Thread Jianguo Tian


> On Sept. 13, 2016, 2:52 a.m., Vihang Karajgaonkar wrote:
> > jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java, line 211
> > 
> >
> > Will it work when we redirect the beeline output to a file?
> 
> Jianguo Tian wrote:
> I have write one Test class which will execute building JDBC connection 
> and initial SQL procedure, then I used "java -Djava.ext.dirs=/* Test > *.txt" 
> to redirect its output. All the content we can see in ".txt" file is initial 
> SQL result, namely output of System.out.pint. It means that we can redirect 
> output to a file.

And I used another way to verify my conclusion: I packaged my project into a 
jar with maven tool, then I write a test class which play the part of JDBC 
client(refer to 
https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients, sample 
code of JDBC section). After runnig this test class, the output if initial SQL 
can be seen on the console.


- Jianguo


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51695/#review148639
---


On Sept. 21, 2016, 3:47 a.m., Jianguo Tian wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51695/
> ---
> 
> (Updated Sept. 21, 2016, 3:47 a.m.)
> 
> 
> Review request for hive and cheng xu.
> 
> 
> Bugs: HIVE-5867
> https://issues.apache.org/jira/browse/HIVE-5867
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> HIVE-5867: JDBC driver and beeline should support executing an initial SQL 
> script
> 
> 
> Diffs
> -
> 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java 
> ad96a6466dd1aadab71fc261f55be4639dcbe2bf 
>   jdbc/src/java/org/apache/hive/jdbc/Utils.java 
> 3161566994d6c6e01de9d88a6e87295684619ffa 
>   jdbc/src/test/org/apache/hive/jdbc/TestInitSQL.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/51695/diff/
> 
> 
> Testing
> ---
> 
> TestInitSQL.java is JUnit test class which will test method initSql() in 
> HiveConnection.java.
> 
> 
> Thanks,
> 
> Jianguo Tian
> 
>



Re: Review Request 50787: Add a timezone-aware timestamp

2016-09-21 Thread Xuefu Zhang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50787/#review149942
---


Ship it!




Ship It!

- Xuefu Zhang


On Sept. 22, 2016, 4:05 a.m., Rui Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50787/
> ---
> 
> (Updated Sept. 22, 2016, 4:05 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-14412
> https://issues.apache.org/jira/browse/HIVE-14412
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> The 1st patch to add timezone-aware timestamp.
> 
> 
> Diffs
> -
> 
>   common/src/test/org/apache/hadoop/hive/common/type/TestTimestampTZ.java 
> PRE-CREATION 
>   contrib/src/test/queries/clientnegative/serde_regex.q a676338 
>   contrib/src/test/queries/clientpositive/serde_regex.q d75d607 
>   contrib/src/test/results/clientnegative/serde_regex.q.out 0f9b036 
>   contrib/src/test/results/clientpositive/serde_regex.q.out 2984293 
>   hbase-handler/src/test/queries/positive/hbase_timestamp.q 0350afe 
>   hbase-handler/src/test/results/positive/hbase_timestamp.q.out 3918121 
>   jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java 93f093f 
>   jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 38918f0 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java de74c3e 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java f28d33e 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java 
> 7be628e 
>   
> ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/TypeConverter.java
>  ba41518 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 
> 8b0db4a 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g 7ceb005 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 62bbcc6 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g 9ba1865 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 
> 82080eb 
>   ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java a718264 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToBoolean.java 17b892c 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToByte.java efae82d 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToDouble.java 9cbc114 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToFloat.java 5808c90 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToInteger.java a7551cb 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToLong.java c961d14 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToShort.java 570408a 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToString.java 5cacd59 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java 259fde8 
>   
> ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToTimestampTZ.java
>  PRE-CREATION 
>   ql/src/test/queries/clientnegative/serde_regex.q c9cfc7d 
>   ql/src/test/queries/clientnegative/serde_regex2.q a29bb9c 
>   ql/src/test/queries/clientnegative/serde_regex3.q 4e91f06 
>   ql/src/test/queries/clientpositive/create_like.q bd39731 
>   ql/src/test/queries/clientpositive/join43.q 12c45a6 
>   ql/src/test/queries/clientpositive/serde_regex.q e21c6e1 
>   ql/src/test/queries/clientpositive/timestamptz.q PRE-CREATION 
>   ql/src/test/queries/clientpositive/timestamptz_1.q PRE-CREATION 
>   ql/src/test/queries/clientpositive/timestamptz_2.q PRE-CREATION 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_1.q.out acecbae 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_2.q.out 41e1c80 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_3.q.out 23e3403 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_4.q.out 3541ef6 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_5.q.out 177039c 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_6.q.out 668380f 
>   ql/src/test/results/clientnegative/serde_regex.q.out 7892bb2 
>   ql/src/test/results/clientnegative/serde_regex2.q.out 1ceb387 
>   ql/src/test/results/clientnegative/serde_regex3.q.out 028a24f 
>   ql/src/test/results/clientnegative/wrong_column_type.q.out 6ff90ea 
>   ql/src/test/results/clientpositive/create_like.q.out 0111c94 
>   ql/src/test/results/clientpositive/join43.q.out 127d5d0 
>   ql/src/test/results/clientpositive/serde_regex.q.out 7bebb0c 
>   ql/src/test/results/clientpositive/timestamptz.q.out PRE-CREATION 
>   ql/src/test/results/clientpositive/timestamptz_1.q.out PRE-CREATION 
>   ql/src/test/results/clientpositive/timestamptz_2.q.out PRE-CREATION 
>   serde/if/serde.thrift 6caad36 
>   serde/src/gen/thrift/gen-cpp/serde_constants.h a5f33fb 
>   serde/src/gen/thrift/gen-cpp/serde_constants.cpp 3a675bf 
>   
> 

Re: Review Request 50787: Add a timezone-aware timestamp

2016-09-21 Thread Rui Li

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50787/
---

(Updated Sept. 22, 2016, 4:05 a.m.)


Review request for hive.


Bugs: HIVE-14412
https://issues.apache.org/jira/browse/HIVE-14412


Repository: hive-git


Description
---

The 1st patch to add timezone-aware timestamp.


Diffs (updated)
-

  common/src/test/org/apache/hadoop/hive/common/type/TestTimestampTZ.java 
PRE-CREATION 
  contrib/src/test/queries/clientnegative/serde_regex.q a676338 
  contrib/src/test/queries/clientpositive/serde_regex.q d75d607 
  contrib/src/test/results/clientnegative/serde_regex.q.out 0f9b036 
  contrib/src/test/results/clientpositive/serde_regex.q.out 2984293 
  hbase-handler/src/test/queries/positive/hbase_timestamp.q 0350afe 
  hbase-handler/src/test/results/positive/hbase_timestamp.q.out 3918121 
  jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java 93f093f 
  jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 38918f0 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java de74c3e 
  ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java f28d33e 
  ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java 
7be628e 
  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/TypeConverter.java
 ba41518 
  ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 8b0db4a 
  ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g 7ceb005 
  ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 62bbcc6 
  ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g 9ba1865 
  ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 82080eb 
  ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java a718264 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToBoolean.java 17b892c 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToByte.java efae82d 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToDouble.java 9cbc114 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToFloat.java 5808c90 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToInteger.java a7551cb 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToLong.java c961d14 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToShort.java 570408a 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToString.java 5cacd59 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java 259fde8 
  
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToTimestampTZ.java 
PRE-CREATION 
  ql/src/test/queries/clientnegative/serde_regex.q c9cfc7d 
  ql/src/test/queries/clientnegative/serde_regex2.q a29bb9c 
  ql/src/test/queries/clientnegative/serde_regex3.q 4e91f06 
  ql/src/test/queries/clientpositive/create_like.q bd39731 
  ql/src/test/queries/clientpositive/join43.q 12c45a6 
  ql/src/test/queries/clientpositive/serde_regex.q e21c6e1 
  ql/src/test/queries/clientpositive/timestamptz.q PRE-CREATION 
  ql/src/test/queries/clientpositive/timestamptz_1.q PRE-CREATION 
  ql/src/test/queries/clientpositive/timestamptz_2.q PRE-CREATION 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_1.q.out acecbae 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_2.q.out 41e1c80 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_3.q.out 23e3403 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_4.q.out 3541ef6 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_5.q.out 177039c 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_6.q.out 668380f 
  ql/src/test/results/clientnegative/serde_regex.q.out 7892bb2 
  ql/src/test/results/clientnegative/serde_regex2.q.out 1ceb387 
  ql/src/test/results/clientnegative/serde_regex3.q.out 028a24f 
  ql/src/test/results/clientnegative/wrong_column_type.q.out 6ff90ea 
  ql/src/test/results/clientpositive/create_like.q.out 0111c94 
  ql/src/test/results/clientpositive/join43.q.out 127d5d0 
  ql/src/test/results/clientpositive/serde_regex.q.out 7bebb0c 
  ql/src/test/results/clientpositive/timestamptz.q.out PRE-CREATION 
  ql/src/test/results/clientpositive/timestamptz_1.q.out PRE-CREATION 
  ql/src/test/results/clientpositive/timestamptz_2.q.out PRE-CREATION 
  serde/if/serde.thrift 6caad36 
  serde/src/gen/thrift/gen-cpp/serde_constants.h a5f33fb 
  serde/src/gen/thrift/gen-cpp/serde_constants.cpp 3a675bf 
  
serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/serdeConstants.java
 04ed8f5 
  serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php 18c3991 
  serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py fafdc24 
  serde/src/gen/thrift/gen-rb/serde_constants.rb 0ce9f27 
  serde/src/java/org/apache/hadoop/hive/serde2/SerDeUtils.java 7ffc964 
  
serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
 5e119d7 
  

Re: Review Request 50787: Add a timezone-aware timestamp

2016-09-21 Thread Xuefu Zhang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50787/#review149940
---




ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java (line 406)


Nit: might be better to put timestamptz right after timestamp for visual 
ease, but not a big deal. Same below.



serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampTZWritable.java (line 
1)


License header please.


- Xuefu Zhang


On Sept. 22, 2016, 1:08 a.m., Rui Li wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50787/
> ---
> 
> (Updated Sept. 22, 2016, 1:08 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-14412
> https://issues.apache.org/jira/browse/HIVE-14412
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> The 1st patch to add timezone-aware timestamp.
> 
> 
> Diffs
> -
> 
>   common/src/test/org/apache/hadoop/hive/common/type/TestTimestampTZ.java 
> PRE-CREATION 
>   contrib/src/test/queries/clientnegative/serde_regex.q a676338 
>   contrib/src/test/queries/clientpositive/serde_regex.q d75d607 
>   contrib/src/test/results/clientnegative/serde_regex.q.out 0f9b036 
>   contrib/src/test/results/clientpositive/serde_regex.q.out 2984293 
>   hbase-handler/src/test/queries/positive/hbase_timestamp.q 0350afe 
>   hbase-handler/src/test/results/positive/hbase_timestamp.q.out 3918121 
>   jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java 93f093f 
>   jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 38918f0 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java de74c3e 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java f28d33e 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java 
> 7be628e 
>   
> ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/TypeConverter.java
>  ba41518 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 
> 8b0db4a 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g 7ceb005 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 62bbcc6 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g 9ba1865 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 
> 82080eb 
>   ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java a718264 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToBoolean.java 17b892c 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToByte.java efae82d 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToDouble.java 9cbc114 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToFloat.java 5808c90 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToInteger.java a7551cb 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToLong.java c961d14 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToShort.java 570408a 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToString.java 5cacd59 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java 259fde8 
>   
> ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToTimestampTZ.java
>  PRE-CREATION 
>   ql/src/test/queries/clientnegative/serde_regex.q c9cfc7d 
>   ql/src/test/queries/clientnegative/serde_regex2.q a29bb9c 
>   ql/src/test/queries/clientnegative/serde_regex3.q 4e91f06 
>   ql/src/test/queries/clientpositive/create_like.q bd39731 
>   ql/src/test/queries/clientpositive/join43.q 12c45a6 
>   ql/src/test/queries/clientpositive/serde_regex.q e21c6e1 
>   ql/src/test/queries/clientpositive/timestamptz.q PRE-CREATION 
>   ql/src/test/queries/clientpositive/timestamptz_1.q PRE-CREATION 
>   ql/src/test/queries/clientpositive/timestamptz_2.q PRE-CREATION 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_1.q.out acecbae 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_2.q.out 41e1c80 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_3.q.out 23e3403 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_4.q.out 3541ef6 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_5.q.out 177039c 
>   ql/src/test/results/clientnegative/invalid_cast_from_binary_6.q.out 668380f 
>   ql/src/test/results/clientnegative/serde_regex.q.out 7892bb2 
>   ql/src/test/results/clientnegative/serde_regex2.q.out 1ceb387 
>   ql/src/test/results/clientnegative/serde_regex3.q.out 028a24f 
>   ql/src/test/results/clientnegative/wrong_column_type.q.out 6ff90ea 
>   ql/src/test/results/clientpositive/create_like.q.out 0111c94 
>   ql/src/test/results/clientpositive/join43.q.out 127d5d0 
>   ql/src/test/results/clientpositive/serde_regex.q.out 7bebb0c 
>   

Re: Review Request 52111: HIVE-14388:Add number of rows inserted message after insert command in Beeline

2016-09-21 Thread Ke Jia

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52111/
---

(Updated Sept. 22, 2016, 1:53 a.m.)


Review request for hive and cheng xu.


Repository: hive-git


Description
---

Currently, when you run insert command on beeline, it returns a message saying 
"No rows affected .."
A better and more intuitive msg would be "xxx rows inserted (26.068 seconds)"


Diffs (updated)
-

  jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java a242501 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 42d398d 
  ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java 4b60514 
  ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java 
bb6ed84 
  ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java 408c92e 
  service-rpc/if/TCLIService.thrift a4fa7b0 
  service/src/java/org/apache/hive/service/cli/CLIService.java 662e55c 
  service/src/java/org/apache/hive/service/cli/OperationStatus.java b0a26e3 
  service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java 
2938338 

Diff: https://reviews.apache.org/r/52111/diff/


Testing
---


Thanks,

Ke Jia



Re: Review Request 50787: Add a timezone-aware timestamp

2016-09-21 Thread Rui Li

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50787/
---

(Updated Sept. 22, 2016, 1:08 a.m.)


Review request for hive.


Bugs: HIVE-14412
https://issues.apache.org/jira/browse/HIVE-14412


Repository: hive-git


Description
---

The 1st patch to add timezone-aware timestamp.


Diffs (updated)
-

  common/src/test/org/apache/hadoop/hive/common/type/TestTimestampTZ.java 
PRE-CREATION 
  contrib/src/test/queries/clientnegative/serde_regex.q a676338 
  contrib/src/test/queries/clientpositive/serde_regex.q d75d607 
  contrib/src/test/results/clientnegative/serde_regex.q.out 0f9b036 
  contrib/src/test/results/clientpositive/serde_regex.q.out 2984293 
  hbase-handler/src/test/queries/positive/hbase_timestamp.q 0350afe 
  hbase-handler/src/test/results/positive/hbase_timestamp.q.out 3918121 
  jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java 93f093f 
  jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 38918f0 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java de74c3e 
  ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java f28d33e 
  ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java 
7be628e 
  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/TypeConverter.java
 ba41518 
  ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 8b0db4a 
  ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g 7ceb005 
  ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 62bbcc6 
  ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g 9ba1865 
  ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 82080eb 
  ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java a718264 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToBoolean.java 17b892c 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToByte.java efae82d 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToDouble.java 9cbc114 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToFloat.java 5808c90 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToInteger.java a7551cb 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToLong.java c961d14 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToShort.java 570408a 
  ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToString.java 5cacd59 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java 259fde8 
  
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToTimestampTZ.java 
PRE-CREATION 
  ql/src/test/queries/clientnegative/serde_regex.q c9cfc7d 
  ql/src/test/queries/clientnegative/serde_regex2.q a29bb9c 
  ql/src/test/queries/clientnegative/serde_regex3.q 4e91f06 
  ql/src/test/queries/clientpositive/create_like.q bd39731 
  ql/src/test/queries/clientpositive/join43.q 12c45a6 
  ql/src/test/queries/clientpositive/serde_regex.q e21c6e1 
  ql/src/test/queries/clientpositive/timestamptz.q PRE-CREATION 
  ql/src/test/queries/clientpositive/timestamptz_1.q PRE-CREATION 
  ql/src/test/queries/clientpositive/timestamptz_2.q PRE-CREATION 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_1.q.out acecbae 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_2.q.out 41e1c80 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_3.q.out 23e3403 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_4.q.out 3541ef6 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_5.q.out 177039c 
  ql/src/test/results/clientnegative/invalid_cast_from_binary_6.q.out 668380f 
  ql/src/test/results/clientnegative/serde_regex.q.out 7892bb2 
  ql/src/test/results/clientnegative/serde_regex2.q.out 1ceb387 
  ql/src/test/results/clientnegative/serde_regex3.q.out 028a24f 
  ql/src/test/results/clientnegative/wrong_column_type.q.out 6ff90ea 
  ql/src/test/results/clientpositive/create_like.q.out 0111c94 
  ql/src/test/results/clientpositive/join43.q.out 127d5d0 
  ql/src/test/results/clientpositive/serde_regex.q.out 7bebb0c 
  ql/src/test/results/clientpositive/timestamptz.q.out PRE-CREATION 
  ql/src/test/results/clientpositive/timestamptz_1.q.out PRE-CREATION 
  ql/src/test/results/clientpositive/timestamptz_2.q.out PRE-CREATION 
  serde/if/serde.thrift 6caad36 
  serde/src/gen/thrift/gen-cpp/serde_constants.h a5f33fb 
  serde/src/gen/thrift/gen-cpp/serde_constants.cpp 3a675bf 
  
serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/serdeConstants.java
 04ed8f5 
  serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php 18c3991 
  serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py fafdc24 
  serde/src/gen/thrift/gen-rb/serde_constants.rb 0ce9f27 
  serde/src/java/org/apache/hadoop/hive/serde2/SerDeUtils.java 7ffc964 
  
serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
 5e119d7 
  

[jira] [Created] (HIVE-14814) metastoreClient is used directly in Hive cause NPE

2016-09-21 Thread Prasanth Jayachandran (JIRA)
Prasanth Jayachandran created HIVE-14814:


 Summary: metastoreClient is used directly in Hive cause NPE
 Key: HIVE-14814
 URL: https://issues.apache.org/jira/browse/HIVE-14814
 Project: Hive
  Issue Type: Bug
Affects Versions: 2.2.0
Reporter: Prasanth Jayachandran
Assignee: Prasanth Jayachandran


Changes introduced by HIVE-13622 uses metastoreClient directly in Hive.java 
which may be null causing NPE. Instead it should use getMSC() which will 
initialize metastoreClient variable when null.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Review Request 51694: HIVE-14713 LDAP Authentication Provider should be covered with unit tests

2016-09-21 Thread Illya Yalovyy


> On Sept. 21, 2016, 12:50 a.m., Szehon Ho wrote:
> > This looks like a great refactoring to me. This class was always hard to 
> > understand, and this makes it a little easier.  I'll defer to Chaoyu to the 
> > comments.

Thank you!


- Illya


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51694/#review149769
---


On Sept. 20, 2016, 7:39 p.m., Illya Yalovyy wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51694/
> ---
> 
> (Updated Sept. 20, 2016, 7:39 p.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan, Chaoyu Tang, Naveen Gangam, and 
> Szehon Ho.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Currently LdapAuthenticationProviderImpl class is not covered with unit 
> tests. To make this class testable some minor refactoring will be required.
> 
> 
> Diffs
> -
> 
>   service/pom.xml ecea719 
>   
> service/src/java/org/apache/hive/service/auth/LdapAuthenticationProviderImpl.java
>  efd5393 
>   service/src/java/org/apache/hive/service/auth/ldap/ChainFilterFactory.java 
> PRE-CREATION 
>   
> service/src/java/org/apache/hive/service/auth/ldap/CustomQueryFilterFactory.java
>  PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/DirSearch.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/DirSearchFactory.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/Filter.java PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/FilterFactory.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/GroupFilterFactory.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/LdapSearch.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/LdapSearchFactory.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/LdapUtils.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/Query.java PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/QueryFactory.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/SearchResultHandler.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/UserFilterFactory.java 
> PRE-CREATION 
>   
> service/src/java/org/apache/hive/service/auth/ldap/UserSearchFilterFactory.java
>  PRE-CREATION 
>   
> service/src/test/org/apache/hive/service/auth/TestLdapAtnProviderWithMiniDS.java
>  089a059 
>   
> service/src/test/org/apache/hive/service/auth/TestLdapAuthenticationProviderImpl.java
>  f276906 
>   service/src/test/org/apache/hive/service/auth/ldap/Credentials.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/LdapTestUtils.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestChainFilter.java 
> PRE-CREATION 
>   
> service/src/test/org/apache/hive/service/auth/ldap/TestCustomQueryFilter.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestGroupFilter.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestLdapSearch.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestLdapUtils.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestQuery.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestQueryFactory.java 
> PRE-CREATION 
>   
> service/src/test/org/apache/hive/service/auth/ldap/TestSearchResultHandler.java
>  PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestUserFilter.java 
> PRE-CREATION 
>   
> service/src/test/org/apache/hive/service/auth/ldap/TestUserSearchFilter.java 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/51694/diff/
> 
> 
> Testing
> ---
> 
> ...hive/service> mvn clean test
> 
> ...
> 
> Results :
> 
> Tests run: 123, Failures: 0, Errors: 0, Skipped: 0
> 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 04:18 min
> [INFO] Finished at: 2016-09-06T08:46:04-07:00
> [INFO] Final Memory: 66M/984M
> [INFO] 
> 
> 
> 
> Thanks,
> 
> Illya Yalovyy
> 
>



Re: Review Request 51694: HIVE-14713 LDAP Authentication Provider should be covered with unit tests

2016-09-21 Thread Illya Yalovyy


> On Sept. 17, 2016, 1:36 a.m., Chaoyu Tang wrote:
> > service/src/java/org/apache/hive/service/auth/ldap/Query.java, line 122
> > 
> >
> > Will it improve the performance to set the search limit? I did not see 
> > it is used.
> 
> Illya Yalovyy wrote:
> I will be used for different filters. Do you think we should use it for 
> existing filters? Which one in particular? Or you would prefer me to remove 
> this option?
> 
> Please keep in mind that this CR is not about performance.
> 
> Chaoyu Tang wrote:
> I thought in the existing implementation, the search limits in some 
> methods like findGroupDNByName, findUserDNByName are set to 2 to reduce the 
> returned results in case there are many, is not it?

It does make sense. I'll make this change.


- Illya


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51694/#review148634
---


On Sept. 20, 2016, 7:39 p.m., Illya Yalovyy wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51694/
> ---
> 
> (Updated Sept. 20, 2016, 7:39 p.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan, Chaoyu Tang, Naveen Gangam, and 
> Szehon Ho.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Currently LdapAuthenticationProviderImpl class is not covered with unit 
> tests. To make this class testable some minor refactoring will be required.
> 
> 
> Diffs
> -
> 
>   service/pom.xml ecea719 
>   
> service/src/java/org/apache/hive/service/auth/LdapAuthenticationProviderImpl.java
>  efd5393 
>   service/src/java/org/apache/hive/service/auth/ldap/ChainFilterFactory.java 
> PRE-CREATION 
>   
> service/src/java/org/apache/hive/service/auth/ldap/CustomQueryFilterFactory.java
>  PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/DirSearch.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/DirSearchFactory.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/Filter.java PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/FilterFactory.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/GroupFilterFactory.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/LdapSearch.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/LdapSearchFactory.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/LdapUtils.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/Query.java PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/QueryFactory.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/SearchResultHandler.java 
> PRE-CREATION 
>   service/src/java/org/apache/hive/service/auth/ldap/UserFilterFactory.java 
> PRE-CREATION 
>   
> service/src/java/org/apache/hive/service/auth/ldap/UserSearchFilterFactory.java
>  PRE-CREATION 
>   
> service/src/test/org/apache/hive/service/auth/TestLdapAtnProviderWithMiniDS.java
>  089a059 
>   
> service/src/test/org/apache/hive/service/auth/TestLdapAuthenticationProviderImpl.java
>  f276906 
>   service/src/test/org/apache/hive/service/auth/ldap/Credentials.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/LdapTestUtils.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestChainFilter.java 
> PRE-CREATION 
>   
> service/src/test/org/apache/hive/service/auth/ldap/TestCustomQueryFilter.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestGroupFilter.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestLdapSearch.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestLdapUtils.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestQuery.java 
> PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestQueryFactory.java 
> PRE-CREATION 
>   
> service/src/test/org/apache/hive/service/auth/ldap/TestSearchResultHandler.java
>  PRE-CREATION 
>   service/src/test/org/apache/hive/service/auth/ldap/TestUserFilter.java 
> PRE-CREATION 
>   
> service/src/test/org/apache/hive/service/auth/ldap/TestUserSearchFilter.java 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/51694/diff/
> 
> 
> Testing
> ---
> 
> ...hive/service> mvn clean test
> 
> ...
> 
> Results :
> 
> Tests run: 123, Failures: 0, Errors: 0, Skipped: 0
> 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> 

[jira] [Created] (HIVE-14813) Make TransactionBatchImpl.toString() include state of each txn: commit/abort

2016-09-21 Thread Eugene Koifman (JIRA)
Eugene Koifman created HIVE-14813:
-

 Summary: Make TransactionBatchImpl.toString() include state of 
each txn: commit/abort
 Key: HIVE-14813
 URL: https://issues.apache.org/jira/browse/HIVE-14813
 Project: Hive
  Issue Type: Bug
  Components: HCatalog, Transactions
Affects Versions: 1.2.1
Reporter: Eugene Koifman
Assignee: Eugene Koifman


perhaps include user abort vs system abort on batch close

also include if close() was called and if there was an exception


cc [~deepesh]





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HIVE-14812) Failing test: TestCliDriver acid_mapjoin

2016-09-21 Thread Siddharth Seth (JIRA)
Siddharth Seth created HIVE-14812:
-

 Summary: Failing test: TestCliDriver acid_mapjoin
 Key: HIVE-14812
 URL: https://issues.apache.org/jira/browse/HIVE-14812
 Project: Hive
  Issue Type: Sub-task
Reporter: Siddharth Seth






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HIVE-14811) Failing test: TestCliDriver ctas

2016-09-21 Thread Siddharth Seth (JIRA)
Siddharth Seth created HIVE-14811:
-

 Summary: Failing test: TestCliDriver ctas
 Key: HIVE-14811
 URL: https://issues.apache.org/jira/browse/HIVE-14811
 Project: Hive
  Issue Type: Sub-task
Reporter: Siddharth Seth






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HIVE-14810) Failing test: TestMetaStoreMetrics.testMetaDataCounts

2016-09-21 Thread Siddharth Seth (JIRA)
Siddharth Seth created HIVE-14810:
-

 Summary: Failing test: TestMetaStoreMetrics.testMetaDataCounts
 Key: HIVE-14810
 URL: https://issues.apache.org/jira/browse/HIVE-14810
 Project: Hive
  Issue Type: Sub-task
Reporter: Siddharth Seth






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HIVE-14809) Support ARCHIVE/UNARCHIVE in tez

2016-09-21 Thread Prasanth Jayachandran (JIRA)
Prasanth Jayachandran created HIVE-14809:


 Summary: Support ARCHIVE/UNARCHIVE in tez
 Key: HIVE-14809
 URL: https://issues.apache.org/jira/browse/HIVE-14809
 Project: Hive
  Issue Type: Bug
  Components: Tez
Affects Versions: 2.2.0
Reporter: Prasanth Jayachandran


ARCHIVE and UNARCHIVE runs as MR job. Add support for it in tez. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HIVE-14808) Support TRUNCATE in tez

2016-09-21 Thread Prasanth Jayachandran (JIRA)
Prasanth Jayachandran created HIVE-14808:


 Summary: Support TRUNCATE in tez
 Key: HIVE-14808
 URL: https://issues.apache.org/jira/browse/HIVE-14808
 Project: Hive
  Issue Type: Bug
  Components: Tez
Affects Versions: 2.2.0
Reporter: Prasanth Jayachandran
Assignee: Prasanth Jayachandran


Truncate query is MR only at this point. Add support for TRUNCATE in tez. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HIVE-14807) analyze table compute statistics fails due to presence of Infinity value in double column

2016-09-21 Thread Edi Bice (JIRA)
Edi Bice created HIVE-14807:
---

 Summary: analyze table compute statistics fails due to presence of 
Infinity value in double column
 Key: HIVE-14807
 URL: https://issues.apache.org/jira/browse/HIVE-14807
 Project: Hive
  Issue Type: Bug
Affects Versions: 1.2.1
 Environment: HDP 2.4 on CentOS 7 Linux 
Reporter: Edi Bice
Priority: Critical


2016-09-21 20:27:45,074 ERROR [pool-3-thread-12]: metastore.RetryingHMSHandler 
(RetryingHMSHandler.java:invoke(173)) - Retrying HMSHandler after 2000 ms 
(attempt 5 of 10) with error: javax.jdo.JDODataStoreException: Cannot set 
Object parameter: value = Infinity for column 
"`TAB_COL_STATS`.`DOUBLE_HIGH_VALUE`" : 'Infinity' is not a valid numeric or 
approximate numeric value
at 
org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:451)
at 
org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:732)
at 
org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:752)
at 
org.apache.hadoop.hive.metastore.ObjectStore.writeMTableColumnStatistics(ObjectStore.java:5937)
at 
org.apache.hadoop.hive.metastore.ObjectStore.updateTableColumnStatistics(ObjectStore.java:5994)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:114)
at com.sun.proxy.$Proxy2.updateTableColumnStatistics(Unknown Source)
at 
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.update_table_column_statistics(HiveMetaStore.java:4358)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
at com.sun.proxy.$Proxy4.update_table_column_statistics(Unknown Source)
at 
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$update_table_column_statistics.getResult(ThriftHiveMetastore.java:10701)
at 
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$update_table_column_statistics.getResult(ThriftHiveMetastore.java:10685)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at 
org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110)
at 
org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at 
org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118)
at 
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
NestedThrowablesStackTrace:
java.sql.SQLException: 'Infinity' is not a valid numeric or approximate numeric 
value
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)
at 
com.mysql.jdbc.PreparedStatement.setDouble(PreparedStatement.java:3743)
at 
com.jolbox.bonecp.PreparedStatementHandle.setDouble(PreparedStatementHandle.java:788)
at 
org.datanucleus.store.rdbms.ParamLoggingPreparedStatement.setDouble(ParamLoggingPreparedStatement.java:726)
at 
org.datanucleus.store.rdbms.mapping.datastore.DoubleRDBMSMapping.setObject(DoubleRDBMSMapping.java:264)
at 
org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping.setObject(SingleFieldMapping.java:211)
at 
org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeObjectField(ParameterSetter.java:197)
at 
org.datanucleus.state.JDOStateManager.providedObjectField(JDOStateManager.java:1269)
at 
org.apache.hadoop.hive.metastore.model.MTableColumnStatistics.jdoProvideField(MTableColumnStatistics.java)
at 
org.apache.hadoop.hive.metastore.model.MTableColumnStatistics.jdoProvideFields(MTableColumnStatistics.java)
at 

Review Request 52127: Support UDTF in CBO (AST return path)

2016-09-21 Thread pengcheng xiong

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52127/
---

Review request for hive and Ashutosh Chauhan.


Repository: hive-git


Description
---

HIVE-14806


Diffs
-

  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveTableFunctionScan.java
 PRE-CREATION 
  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java
 9f5e733 
  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java
 911b86b 
  ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java e2ddb14 

Diff: https://reviews.apache.org/r/52127/diff/


Testing
---


Thanks,

pengcheng xiong



[jira] [Created] (HIVE-14806) Support UDTF in CBO (AST return path)

2016-09-21 Thread Pengcheng Xiong (JIRA)
Pengcheng Xiong created HIVE-14806:
--

 Summary: Support UDTF in CBO (AST return path)
 Key: HIVE-14806
 URL: https://issues.apache.org/jira/browse/HIVE-14806
 Project: Hive
  Issue Type: Sub-task
Reporter: Pengcheng Xiong
Assignee: Pengcheng Xiong






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (HIVE-14805) Subquery inside a view doesn't set InsideView property correctly

2016-09-21 Thread Aihua Xu (JIRA)
Aihua Xu created HIVE-14805:
---

 Summary: Subquery inside a view doesn't set InsideView property 
correctly
 Key: HIVE-14805
 URL: https://issues.apache.org/jira/browse/HIVE-14805
 Project: Hive
  Issue Type: Bug
  Components: Views
Affects Versions: 2.0.1
Reporter: Aihua Xu
Assignee: Aihua Xu


Here is the repro steps.

create table t1(col string);
create view v1 as select * from t1;
create view dataview as select v1.col from v1 join (select * from v1) v2 on 
v1.col=v2.col;
select * from dataview;

If hive is configured with authorization hook like Sentry, it will require the 
access not only for dataview but also for v1, which should not be required.
The subquery seems to not carry insideview property from the parent query.








--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Review Request 52084: HIVE-14775: Investigate IOException usage in Metrics APIs

2016-09-21 Thread Gabor Szadovszky

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52084/#review149832
---


Ship it!




Thanks, LGTM.

- Gabor Szadovszky


On Sept. 21, 2016, 3:20 p.m., Barna Zsombor Klara wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52084/
> ---
> 
> (Updated Sept. 21, 2016, 3:20 p.m.)
> 
> 
> Review request for hive, Gabor Szadovszky, Peter Vary, Sergio Pena, and 
> Szehon Ho.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> I have refactored the exception handling in the metrics API. The initial 
> objective was to remove the throws clause from the methods which did not 
> throw IOExceptions but were declaring it. Finally I continued to remove the 
> throws clause from the rest of the APIs since we were never able to do 
> anything else with the excpetions except log them out. New log messages were 
> introduced inside the metrics classes to capture exceptional conditions so we 
> can omit the try catch blocks when creating/updating metrics.
> 
> 
> Diffs
> -
> 
>   common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java 
> 9be9b50aa02ff88816eb92079eaff9afa3e1be90 
>   common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBean.java 
> 19946d9e93d55bbffb6d03cbc35e569849a86dd8 
>   common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBeanImpl.java 
> a973155f079c6124a6981b04123d9496dc5d3448 
>   common/src/java/org/apache/hadoop/hive/common/metrics/common/Metrics.java 
> 4297233ed12a7d9a2fa03ac3204e8335c0aed821 
>   
> common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
>  4c433678bd62ea74b80babce9856681192deb25f 
>   common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java 
> 6a5d22f2bcc0a7efd869f7c0c0c8fad33ca35f74 
>   
> common/src/test/org/apache/hadoop/hive/common/metrics/TestLegacyMetrics.java 
> a3fb04f1ab9be8be9f69c616eabeb534b2a2d560 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java 
> 6830cf75dc163230cdabb4ed41d65c222c6ca54d 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
> f0b84768e891e4281a613e68590524646a038435 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 
> 42d398dcc9a37bdb2d90c940c579c55fb76b4cca 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 
> 90fe76d00e6f833e18d183c290f13c23db9303a1 
> 
> Diff: https://reviews.apache.org/r/52084/diff/
> 
> 
> Testing
> ---
> 
> Tested basic metric gathering with both codahale and legacy metrics class.
> Updated and ran unit tests in the common project.
> 
> 
> Thanks,
> 
> Barna Zsombor Klara
> 
>



Re: Review Request 52122: HIVE-9423 - HiveServer2: Implement some admission control mechanism for graceful degradation when resources are exhausted

2016-09-21 Thread Barna Zsombor Klara

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52122/#review149826
---


Ship it!




+1, just some typos.
Thanks for the patch.


beeline/src/main/resources/BeeLine.properties (line 148)


The root cause might be **a** too high concurrent number of connections. 
Please check the number of active connections and adjust 
hive.server2.thrift.max.worker.threads **if** applicable.


- Barna Zsombor Klara


On Sept. 21, 2016, 3:15 p.m., Peter Vary wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52122/
> ---
> 
> (Updated Sept. 21, 2016, 3:15 p.m.)
> 
> 
> Review request for hive, Aihua Xu, Marta Kuczora, Miklos Csanady, Sergio 
> Pena, Vaibhav Gumashta, and Barna Zsombor Klara.
> 
> 
> Bugs: HIVE-9423
> https://issues.apache.org/jira/browse/HIVE-9423
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Adding different error message depending on the thrown TTransportException
> 
> 
> Diffs
> -
> 
>   beeline/src/java/org/apache/hive/beeline/BeeLine.java 5322ca6 
>   beeline/src/main/resources/BeeLine.properties 13321d2 
>   beeline/src/test/org/apache/hive/beeline/TestBeeLineExceptionHandling.java 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52122/diff/
> 
> 
> Testing
> ---
> 
> Manual, and added unit test depending on the exception code
> 
> 
> Thanks,
> 
> Peter Vary
> 
>



Re: Review Request 52084: HIVE-14775: Investigate IOException usage in Metrics APIs

2016-09-21 Thread Peter Vary

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52084/#review149828
---



LGTM, thanks for the patch

- Peter Vary


On Sept. 21, 2016, 3:20 p.m., Barna Zsombor Klara wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52084/
> ---
> 
> (Updated Sept. 21, 2016, 3:20 p.m.)
> 
> 
> Review request for hive, Gabor Szadovszky, Peter Vary, Sergio Pena, and 
> Szehon Ho.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> I have refactored the exception handling in the metrics API. The initial 
> objective was to remove the throws clause from the methods which did not 
> throw IOExceptions but were declaring it. Finally I continued to remove the 
> throws clause from the rest of the APIs since we were never able to do 
> anything else with the excpetions except log them out. New log messages were 
> introduced inside the metrics classes to capture exceptional conditions so we 
> can omit the try catch blocks when creating/updating metrics.
> 
> 
> Diffs
> -
> 
>   common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java 
> 9be9b50aa02ff88816eb92079eaff9afa3e1be90 
>   common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBean.java 
> 19946d9e93d55bbffb6d03cbc35e569849a86dd8 
>   common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBeanImpl.java 
> a973155f079c6124a6981b04123d9496dc5d3448 
>   common/src/java/org/apache/hadoop/hive/common/metrics/common/Metrics.java 
> 4297233ed12a7d9a2fa03ac3204e8335c0aed821 
>   
> common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
>  4c433678bd62ea74b80babce9856681192deb25f 
>   common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java 
> 6a5d22f2bcc0a7efd869f7c0c0c8fad33ca35f74 
>   
> common/src/test/org/apache/hadoop/hive/common/metrics/TestLegacyMetrics.java 
> a3fb04f1ab9be8be9f69c616eabeb534b2a2d560 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java 
> 6830cf75dc163230cdabb4ed41d65c222c6ca54d 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
> f0b84768e891e4281a613e68590524646a038435 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 
> 42d398dcc9a37bdb2d90c940c579c55fb76b4cca 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 
> 90fe76d00e6f833e18d183c290f13c23db9303a1 
> 
> Diff: https://reviews.apache.org/r/52084/diff/
> 
> 
> Testing
> ---
> 
> Tested basic metric gathering with both codahale and legacy metrics class.
> Updated and ran unit tests in the common project.
> 
> 
> Thanks,
> 
> Barna Zsombor Klara
> 
>



Re: Review Request 52084: HIVE-14775: Investigate IOException usage in Metrics APIs

2016-09-21 Thread Barna Zsombor Klara

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52084/
---

(Updated Sept. 21, 2016, 3:20 p.m.)


Review request for hive, Gabor Szadovszky, Peter Vary, Sergio Pena, and Szehon 
Ho.


Repository: hive-git


Description (updated)
---

I have refactored the exception handling in the metrics API. The initial 
objective was to remove the throws clause from the methods which did not throw 
IOExceptions but were declaring it. Finally I continued to remove the throws 
clause from the rest of the APIs since we were never able to do anything else 
with the excpetions except log them out. New log messages were introduced 
inside the metrics classes to capture exceptional conditions so we can omit the 
try catch blocks when creating/updating metrics.


Diffs
-

  common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java 
9be9b50aa02ff88816eb92079eaff9afa3e1be90 
  common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBean.java 
19946d9e93d55bbffb6d03cbc35e569849a86dd8 
  common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBeanImpl.java 
a973155f079c6124a6981b04123d9496dc5d3448 
  common/src/java/org/apache/hadoop/hive/common/metrics/common/Metrics.java 
4297233ed12a7d9a2fa03ac3204e8335c0aed821 
  
common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
 4c433678bd62ea74b80babce9856681192deb25f 
  common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java 
6a5d22f2bcc0a7efd869f7c0c0c8fad33ca35f74 
  common/src/test/org/apache/hadoop/hive/common/metrics/TestLegacyMetrics.java 
a3fb04f1ab9be8be9f69c616eabeb534b2a2d560 
  metastore/src/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java 
6830cf75dc163230cdabb4ed41d65c222c6ca54d 
  metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
f0b84768e891e4281a613e68590524646a038435 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 
42d398dcc9a37bdb2d90c940c579c55fb76b4cca 
  service/src/java/org/apache/hive/service/cli/operation/Operation.java 
90fe76d00e6f833e18d183c290f13c23db9303a1 

Diff: https://reviews.apache.org/r/52084/diff/


Testing
---

Tested basic metric gathering with both codahale and legacy metrics class.
Updated and ran unit tests in the common project.


Thanks,

Barna Zsombor Klara



Re: Review Request 52084: HIVE-14775: Investigate IOException usage in Metrics APIs

2016-09-21 Thread Barna Zsombor Klara


> On Sept. 21, 2016, 12:16 p.m., Gabor Szadovszky wrote:
> > Thanks for the patch.
> > One minor finding and a question:
> > At many places you have refactored to throw unchecked exceptions instead of 
> > checked ones while removed the catch blocks of the checked ones. Are you 
> > sure it cannot cause any problems in production? (E.g. metrics should never 
> > fail a query...)

I had the following cases:
- getStoredScope used to throw IOException, but now it is throwing 
IllegalArgumentException. It is not part of the MetricScope API, but it is 
public, so if someone explicitly casts MetricScope to the implementing class 
then it can be accessed. Currently I cannot find it being used in the project 
except in tests.
- getTimer is now throwing IllegalStateException instead of IOException. 
However incrementCounter and decrementCounter were both throwing 
RuntimeExpception for the same case (when the cache could not create the 
underlying object), so I thought it better to have the same behaviour.


> On Sept. 21, 2016, 12:16 p.m., Gabor Szadovszky wrote:
> > common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java, 
> > line 249
> > 
> >
> > throws clause is not required here

As this is a kind of public API I would like to keep the throws clause for 
documentation purposes.


- Barna Zsombor


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52084/#review149810
---


On Sept. 21, 2016, 3:19 p.m., Barna Zsombor Klara wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52084/
> ---
> 
> (Updated Sept. 21, 2016, 3:19 p.m.)
> 
> 
> Review request for hive, Gabor Szadovszky, Peter Vary, Sergio Pena, and 
> Szehon Ho.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> HIVE-14775: Investigate IOException usage in Metrics APIs
> 
> 
> Diffs
> -
> 
>   common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java 
> 9be9b50aa02ff88816eb92079eaff9afa3e1be90 
>   common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBean.java 
> 19946d9e93d55bbffb6d03cbc35e569849a86dd8 
>   common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBeanImpl.java 
> a973155f079c6124a6981b04123d9496dc5d3448 
>   common/src/java/org/apache/hadoop/hive/common/metrics/common/Metrics.java 
> 4297233ed12a7d9a2fa03ac3204e8335c0aed821 
>   
> common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
>  4c433678bd62ea74b80babce9856681192deb25f 
>   common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java 
> 6a5d22f2bcc0a7efd869f7c0c0c8fad33ca35f74 
>   
> common/src/test/org/apache/hadoop/hive/common/metrics/TestLegacyMetrics.java 
> a3fb04f1ab9be8be9f69c616eabeb534b2a2d560 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java 
> 6830cf75dc163230cdabb4ed41d65c222c6ca54d 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
> f0b84768e891e4281a613e68590524646a038435 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 
> 42d398dcc9a37bdb2d90c940c579c55fb76b4cca 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 
> 90fe76d00e6f833e18d183c290f13c23db9303a1 
> 
> Diff: https://reviews.apache.org/r/52084/diff/
> 
> 
> Testing
> ---
> 
> Tested basic metric gathering with both codahale and legacy metrics class.
> Updated and ran unit tests in the common project.
> 
> 
> Thanks,
> 
> Barna Zsombor Klara
> 
>



Re: Review Request 52084: HIVE-14775: Investigate IOException usage in Metrics APIs

2016-09-21 Thread Barna Zsombor Klara

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52084/
---

(Updated Sept. 21, 2016, 3:19 p.m.)


Review request for hive, Gabor Szadovszky, Peter Vary, Sergio Pena, and Szehon 
Ho.


Changes
---

Added a unit test, reduced code duplication and answered comments.
Thank you for the reviews.


Repository: hive-git


Description (updated)
---

HIVE-14775: Investigate IOException usage in Metrics APIs


Diffs (updated)
-

  common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java 
9be9b50aa02ff88816eb92079eaff9afa3e1be90 
  common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBean.java 
19946d9e93d55bbffb6d03cbc35e569849a86dd8 
  common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBeanImpl.java 
a973155f079c6124a6981b04123d9496dc5d3448 
  common/src/java/org/apache/hadoop/hive/common/metrics/common/Metrics.java 
4297233ed12a7d9a2fa03ac3204e8335c0aed821 
  
common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
 4c433678bd62ea74b80babce9856681192deb25f 
  common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java 
6a5d22f2bcc0a7efd869f7c0c0c8fad33ca35f74 
  common/src/test/org/apache/hadoop/hive/common/metrics/TestLegacyMetrics.java 
a3fb04f1ab9be8be9f69c616eabeb534b2a2d560 
  metastore/src/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java 
6830cf75dc163230cdabb4ed41d65c222c6ca54d 
  metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
f0b84768e891e4281a613e68590524646a038435 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 
42d398dcc9a37bdb2d90c940c579c55fb76b4cca 
  service/src/java/org/apache/hive/service/cli/operation/Operation.java 
90fe76d00e6f833e18d183c290f13c23db9303a1 

Diff: https://reviews.apache.org/r/52084/diff/


Testing
---

Tested basic metric gathering with both codahale and legacy metrics class.
Updated and ran unit tests in the common project.


Thanks,

Barna Zsombor Klara



Review Request 52122: HIVE-9423 - HiveServer2: Implement some admission control mechanism for graceful degradation when resources are exhausted

2016-09-21 Thread Peter Vary

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52122/
---

Review request for hive, Aihua Xu, Marta Kuczora, Miklos Csanady, Sergio Pena, 
Vaibhav Gumashta, and Barna Zsombor Klara.


Bugs: HIVE-9423
https://issues.apache.org/jira/browse/HIVE-9423


Repository: hive-git


Description
---

Adding different error message depending on the thrown TTransportException


Diffs
-

  beeline/src/java/org/apache/hive/beeline/BeeLine.java 5322ca6 
  beeline/src/main/resources/BeeLine.properties 13321d2 
  beeline/src/test/org/apache/hive/beeline/TestBeeLineExceptionHandling.java 
PRE-CREATION 

Diff: https://reviews.apache.org/r/52122/diff/


Testing
---

Manual, and added unit test depending on the exception code


Thanks,

Peter Vary



[jira] [Created] (HIVE-14804) HPLSQL multiple db connection does not switch back to Hive

2016-09-21 Thread Dmitry Kozlov (JIRA)
Dmitry Kozlov created HIVE-14804:


 Summary: HPLSQL multiple db connection does not switch back to Hive
 Key: HIVE-14804
 URL: https://issues.apache.org/jira/browse/HIVE-14804
 Project: Hive
  Issue Type: Bug
  Components: hpl/sql
Reporter: Dmitry Kozlov
Assignee: Dmitry Tolpeko
Priority: Blocker


I have a problem with a multi database connection. I have 3 environments that I 
would like to connect in my HPLSQL code Hive, DB2 and MySql. As soon as I map 
any table either from DB2 or MySQL my code stops to recognize Hive tables. 
Actually it starts to think that it is a table from the same database (DB2 or 
MySql) that was mapped the last. It means your example 
http://www.hplsql.org/map-object works only one way from Hive to MySQL and it 
is not possible to go back to Hive.  


Here is a simple piece of code.

declare cnt int;
begin

/*
PRINT 'Start MySQL';
MAP OBJECT tbls TO hive.TBLS AT mysqlconn;
select count(*)
into cnt
from tbls;
PRINT cnt;

PRINT 'Start Db2';

MAP OBJECT exch TO DBDEV2.TEST_EXCHANGE AT db2conn;
select count(1) 
into cnt
from exch;
PRINT cnt;*/

PRINT 'Check Hive';
SELECT count(1) 
into cnt
FROM dev.test_sqoop;
PRINT cnt;

end;

It has three blocks. One select from MySQL, second from DB2 and third from Hive 
ORC table.
When first two blocks are commented then block 3 works. See below
Check Hive
16/09/20 18:08:08 INFO jdbc.Utils: Supplied authorities: localhost:1
16/09/20 18:08:08 INFO jdbc.Utils: Resolved authority: localhost:1
16/09/20 18:08:08 INFO jdbc.HiveConnection: Will try to open client transport 
with JDBC Uri: jdbc:hive2://localhost:1
Open connection: jdbc:hive2://localhost:1 (497 ms)
Starting query
Query executed successfully (177 ms)
82

When I try to uncomment any of those blocks then block 3 stops working. For 
example, if I uncomment block 1 I get this output. It is now assumes that 
dev.test_sqoop is a MySQL table. Contrarily to your example

Start MySQL
Open connection: jdbc:mysql://10.11.12.144:3306/hive (489 ms)
Starting query
Query executed successfully (4 ms)
539
Check Hive
Starting query
Unhandled exception in HPL/SQL
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 
'dev.test_sqoop' doesn't exist

If I comment the second block then it starts to assume that dev.test_sqoop is a 
DB2 table. See below. So switch between DB2 and MySQL is working, however, the 
hive table is still not working

Start MySQL
Open connection: jdbc:mysql://10.11.12.144:3306/hive (485 ms)
Starting query
Query executed successfully (5 ms)
539
Start Db2
Open connection: jdbc:db2://10.11.12.141:5/WM (227 ms)
Starting query
Query executed successfully (48 ms)
0
Check Hive
Starting query
Unhandled exception in HPL/SQL
com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, 
SQLSTATE=42704, SQLERRMC=DEV.TEST_SQOOP, DRIVER=4.16.53

Could you, please, provide your feedback on this finding. In addition, I would 
like to check if it would be possible to insert into a DB2 table records that 
were selected from a Hive with one statement as soon as DB2 table is properly 
mapped. Please, explain.

Looking forward to hearing from you soon.


Regards,
Dmitry Kozlov
Daisy Intelligence   




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Review Request 52084: HIVE-14775: Investigate IOException usage in Metrics APIs

2016-09-21 Thread Peter Vary

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52084/#review149805
---



Thanks Zsombor!

Godd refactor, just minor nits, and some questions.

Thanks,
Peter


common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
 (line 262)


nit: retrieving



common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
 (line 281)


nit: retrieving



common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
 (line 318)


nit: retrieving



common/src/test/org/apache/hadoop/hive/common/metrics/TestLegacyMetrics.java 


Not really into this part of the code, but we might want at least check 
that calling the startStoredScope again will not cause any trouble here. Would 
be perfect if we could check the log, but that might be an overkill :)



metastore/src/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java 
(lines 48 - 50)


If refactoring, this 3 lines might be put into an util method, to avoid 
code duplication :). Not that important, just an idea


- Peter Vary


On Sept. 21, 2016, 9:24 a.m., Barna Zsombor Klara wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52084/
> ---
> 
> (Updated Sept. 21, 2016, 9:24 a.m.)
> 
> 
> Review request for hive, Gabor Szadovszky, Peter Vary, Sergio Pena, and 
> Szehon Ho.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> I have refactored the exception handling in the metrics API. The initial 
> objective was to remove the throws clause from the methods which did not 
> throw IOExceptions but were declaring it. Finally I continued to remove the 
> throws clause from the rest of the APIs since we were never able to do 
> anything else with the excpetions except log them out. New log messages were 
> introduced inside the metrics classes to capture exceptional conditions so we 
> can omit the try catch blocks when creating/updating metrics.
> 
> 
> Diffs
> -
> 
>   common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java 
> 9be9b50aa02ff88816eb92079eaff9afa3e1be90 
>   common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBean.java 
> 19946d9e93d55bbffb6d03cbc35e569849a86dd8 
>   common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBeanImpl.java 
> a973155f079c6124a6981b04123d9496dc5d3448 
>   common/src/java/org/apache/hadoop/hive/common/metrics/common/Metrics.java 
> 4297233ed12a7d9a2fa03ac3204e8335c0aed821 
>   
> common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
>  4c433678bd62ea74b80babce9856681192deb25f 
>   common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java 
> 6a5d22f2bcc0a7efd869f7c0c0c8fad33ca35f74 
>   
> common/src/test/org/apache/hadoop/hive/common/metrics/TestLegacyMetrics.java 
> a3fb04f1ab9be8be9f69c616eabeb534b2a2d560 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java 
> 6830cf75dc163230cdabb4ed41d65c222c6ca54d 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
> f0b84768e891e4281a613e68590524646a038435 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 
> 42d398dcc9a37bdb2d90c940c579c55fb76b4cca 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 
> 90fe76d00e6f833e18d183c290f13c23db9303a1 
> 
> Diff: https://reviews.apache.org/r/52084/diff/
> 
> 
> Testing
> ---
> 
> Tested basic metric gathering with both codahale and legacy metrics class.
> Updated and ran unit tests in the common project.
> 
> 
> Thanks,
> 
> Barna Zsombor Klara
> 
>



Re: Review Request 52084: HIVE-14775: Investigate IOException usage in Metrics APIs

2016-09-21 Thread Gabor Szadovszky

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52084/#review149810
---



Thanks for the patch.
One minor finding and a question:
At many places you have refactored to throw unchecked exceptions instead of 
checked ones while removed the catch blocks of the checked ones. Are you sure 
it cannot cause any problems in production? (E.g. metrics should never fail a 
query...)


common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java (line 
244)


throws clause is not required here


- Gabor Szadovszky


On Sept. 21, 2016, 9:24 a.m., Barna Zsombor Klara wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52084/
> ---
> 
> (Updated Sept. 21, 2016, 9:24 a.m.)
> 
> 
> Review request for hive, Gabor Szadovszky, Peter Vary, Sergio Pena, and 
> Szehon Ho.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> I have refactored the exception handling in the metrics API. The initial 
> objective was to remove the throws clause from the methods which did not 
> throw IOExceptions but were declaring it. Finally I continued to remove the 
> throws clause from the rest of the APIs since we were never able to do 
> anything else with the excpetions except log them out. New log messages were 
> introduced inside the metrics classes to capture exceptional conditions so we 
> can omit the try catch blocks when creating/updating metrics.
> 
> 
> Diffs
> -
> 
>   common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java 
> 9be9b50aa02ff88816eb92079eaff9afa3e1be90 
>   common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBean.java 
> 19946d9e93d55bbffb6d03cbc35e569849a86dd8 
>   common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBeanImpl.java 
> a973155f079c6124a6981b04123d9496dc5d3448 
>   common/src/java/org/apache/hadoop/hive/common/metrics/common/Metrics.java 
> 4297233ed12a7d9a2fa03ac3204e8335c0aed821 
>   
> common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
>  4c433678bd62ea74b80babce9856681192deb25f 
>   common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java 
> 6a5d22f2bcc0a7efd869f7c0c0c8fad33ca35f74 
>   
> common/src/test/org/apache/hadoop/hive/common/metrics/TestLegacyMetrics.java 
> a3fb04f1ab9be8be9f69c616eabeb534b2a2d560 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java 
> 6830cf75dc163230cdabb4ed41d65c222c6ca54d 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
> f0b84768e891e4281a613e68590524646a038435 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 
> 42d398dcc9a37bdb2d90c940c579c55fb76b4cca 
>   service/src/java/org/apache/hive/service/cli/operation/Operation.java 
> 90fe76d00e6f833e18d183c290f13c23db9303a1 
> 
> Diff: https://reviews.apache.org/r/52084/diff/
> 
> 
> Testing
> ---
> 
> Tested basic metric gathering with both codahale and legacy metrics class.
> Updated and ran unit tests in the common project.
> 
> 
> Thanks,
> 
> Barna Zsombor Klara
> 
>



Re: Review Request 52111: HIVE-14388:Add number of rows inserted message after insert command in Beeline

2016-09-21 Thread Marta Kuczora

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52111/#review149801
---



Thanks a lot for the patch. I had just some minor hints.

- Marta Kuczora


On Sept. 21, 2016, 7:25 a.m., Ke Jia wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52111/
> ---
> 
> (Updated Sept. 21, 2016, 7:25 a.m.)
> 
> 
> Review request for hive and cheng xu.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Currently, when you run insert command on beeline, it returns a message 
> saying "No rows affected .."
> A better and more intuitive msg would be "xxx rows inserted (26.068 seconds)"
> 
> 
> Diffs
> -
> 
>   jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java a242501 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 42d398d 
>   ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java 4b60514 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java 
> bb6ed84 
>   ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java 408c92e 
>   service-rpc/if/TCLIService.thrift a4fa7b0 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java
>  358e322 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBinaryColumn.java
>  a869cee 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolColumn.java
>  9bb6366 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolValue.java
>  87b3070 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteColumn.java
>  68b3d3c 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteValue.java
>  a3d5951 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java
>  6dba051 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java
>  930bed7 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java
>  a7d4e7d 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java
>  611e92c 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java
>  4076c57 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java
>  7bcc765 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java
>  47a6b83 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java
>  0860a2b 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java
>  43ee87f 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java
>  38f82ac 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumn.java
>  3c09c6b 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnDesc.java
>  31472c8 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnValue.java
>  be99ce0 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleColumn.java
>  f93c9b4 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleValue.java
>  5700355 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java
>  1f73cec 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java
>  7101fa5 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchOrientation.java
>  159be45 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java
>  2c93339 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java
>  8f86cee 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java
>  b8a2ca6 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java
>  eeeac9a 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java
>  ba80279 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java
>  c68aac9 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java
>  9729570 
>   
> 

Re: Review Request 52111: HIVE-14388:Add number of rows inserted message after insert command in Beeline

2016-09-21 Thread Marta Kuczora

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52111/#review149800
---




ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java (line 35)


The "numrows" variable should be private if there is no particular reason 
against it.



ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java (line 58)


Could you please format these methods to multiple lines?
Something like:

  public long getNumrows() {
return numrows;
  }

  public void setNumrows(long numrows) {
this.numrows = numrows;
  }



ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java (line 
422)


Please add a space after "=".



ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (line 1450)


Could you please format these methods to multiple lines?
Something like:

  public long getNumrows() {
return numrows;
  }

  public void setNumrows(long numrows) {
this.numrows = numrows;
  }



service/src/java/org/apache/hive/service/cli/OperationStatus.java (line 53)


Could you please format these methods to multiple lines?
Something like:

  public long getNumrows() {
return numrows;
  }

  public void setNumrows(long numrows) {
this.numrows = numrows;
  }


- Marta Kuczora


On Sept. 21, 2016, 7:25 a.m., Ke Jia wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52111/
> ---
> 
> (Updated Sept. 21, 2016, 7:25 a.m.)
> 
> 
> Review request for hive and cheng xu.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Currently, when you run insert command on beeline, it returns a message 
> saying "No rows affected .."
> A better and more intuitive msg would be "xxx rows inserted (26.068 seconds)"
> 
> 
> Diffs
> -
> 
>   jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java a242501 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 42d398d 
>   ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java 4b60514 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java 
> bb6ed84 
>   ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java 408c92e 
>   service-rpc/if/TCLIService.thrift a4fa7b0 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java
>  358e322 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBinaryColumn.java
>  a869cee 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolColumn.java
>  9bb6366 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolValue.java
>  87b3070 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteColumn.java
>  68b3d3c 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteValue.java
>  a3d5951 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java
>  6dba051 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java
>  930bed7 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java
>  a7d4e7d 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java
>  611e92c 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java
>  4076c57 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java
>  7bcc765 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java
>  47a6b83 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java
>  0860a2b 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java
>  43ee87f 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java
>  38f82ac 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumn.java
>  3c09c6b 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnDesc.java
>  31472c8 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnValue.java
>  be99ce0 
>   
> 

Review Request 52084: HIVE-14775: Investigate IOException usage in Metrics APIs

2016-09-21 Thread Barna Zsombor Klara

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52084/
---

Review request for hive, Gabor Szadovszky, Peter Vary, Sergio Pena, and Szehon 
Ho.


Repository: hive-git


Description
---

I have refactored the exception handling in the metrics API. The initial 
objective was to remove the throws clause from the methods which did not throw 
IOExceptions but were declaring it. Finally I continued to remove the throws 
clause from the rest of the APIs since we were never able to do anything else 
with the excpetions except log them out. New log messages were introduced 
inside the metrics classes to capture exceptional conditions so we can omit the 
try catch blocks when creating/updating metrics.


Diffs
-

  common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java 
9be9b50aa02ff88816eb92079eaff9afa3e1be90 
  common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBean.java 
19946d9e93d55bbffb6d03cbc35e569849a86dd8 
  common/src/java/org/apache/hadoop/hive/common/metrics/MetricsMBeanImpl.java 
a973155f079c6124a6981b04123d9496dc5d3448 
  common/src/java/org/apache/hadoop/hive/common/metrics/common/Metrics.java 
4297233ed12a7d9a2fa03ac3204e8335c0aed821 
  
common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java
 4c433678bd62ea74b80babce9856681192deb25f 
  common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java 
6a5d22f2bcc0a7efd869f7c0c0c8fad33ca35f74 
  common/src/test/org/apache/hadoop/hive/common/metrics/TestLegacyMetrics.java 
a3fb04f1ab9be8be9f69c616eabeb534b2a2d560 
  metastore/src/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java 
6830cf75dc163230cdabb4ed41d65c222c6ca54d 
  metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
f0b84768e891e4281a613e68590524646a038435 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 
42d398dcc9a37bdb2d90c940c579c55fb76b4cca 
  service/src/java/org/apache/hive/service/cli/operation/Operation.java 
90fe76d00e6f833e18d183c290f13c23db9303a1 

Diff: https://reviews.apache.org/r/52084/diff/


Testing
---

Tested basic metric gathering with both codahale and legacy metrics class.
Updated and ran unit tests in the common project.


Thanks,

Barna Zsombor Klara



Re: Review Request 52111: HIVE-14388:Add number of rows inserted message after insert command in Beeline

2016-09-21 Thread cheng xu

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52111/#review149796
---




ql/src/java/org/apache/hadoop/hive/ql/Driver.java (line 1863)


Space needed around +



ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java (line 
379)


Remove it if no needed.



service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java
 (line 2)


Can you use Thrift 0.9.3 version?



service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java (line 
43)


Please use previous import which doesn't import unneeded package.



service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java (line 
628)


Remove debug info.


For review, please don't include the generated files. :) I will review further 
it.

- cheng xu


On Sept. 21, 2016, 3:25 p.m., Ke Jia wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52111/
> ---
> 
> (Updated Sept. 21, 2016, 3:25 p.m.)
> 
> 
> Review request for hive and cheng xu.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Currently, when you run insert command on beeline, it returns a message 
> saying "No rows affected .."
> A better and more intuitive msg would be "xxx rows inserted (26.068 seconds)"
> 
> 
> Diffs
> -
> 
>   jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java a242501 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 42d398d 
>   ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java 4b60514 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java 
> bb6ed84 
>   ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java 408c92e 
>   service-rpc/if/TCLIService.thrift a4fa7b0 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java
>  358e322 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBinaryColumn.java
>  a869cee 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolColumn.java
>  9bb6366 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolValue.java
>  87b3070 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteColumn.java
>  68b3d3c 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteValue.java
>  a3d5951 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java
>  6dba051 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java
>  930bed7 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java
>  a7d4e7d 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java
>  611e92c 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java
>  4076c57 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java
>  7bcc765 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java
>  47a6b83 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java
>  0860a2b 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java
>  43ee87f 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java
>  38f82ac 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumn.java
>  3c09c6b 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnDesc.java
>  31472c8 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnValue.java
>  be99ce0 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleColumn.java
>  f93c9b4 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleValue.java
>  5700355 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java
>  1f73cec 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java
>  7101fa5 
>   
> 

Review Request 52111: HIVE-14388:Add number of rows inserted message after insert command in Beeline

2016-09-21 Thread Ke Jia

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52111/
---

Review request for hive and cheng xu.


Repository: hive-git


Description
---

Currently, when you run insert command on beeline, it returns a message saying 
"No rows affected .."
A better and more intuitive msg would be "xxx rows inserted (26.068 seconds)"


Diffs
-

  jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java a242501 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 42d398d 
  ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java 4b60514 
  ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java 
bb6ed84 
  ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java 408c92e 
  service-rpc/if/TCLIService.thrift a4fa7b0 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java
 358e322 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBinaryColumn.java
 a869cee 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolColumn.java
 9bb6366 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolValue.java
 87b3070 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteColumn.java
 68b3d3c 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteValue.java
 a3d5951 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java
 6dba051 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java
 930bed7 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java
 a7d4e7d 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java
 611e92c 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java
 4076c57 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java
 7bcc765 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java
 47a6b83 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java
 0860a2b 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java
 43ee87f 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java
 38f82ac 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumn.java
 3c09c6b 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnDesc.java
 31472c8 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnValue.java
 be99ce0 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleColumn.java
 f93c9b4 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleValue.java
 5700355 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java
 1f73cec 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java
 7101fa5 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchOrientation.java
 159be45 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java
 2c93339 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java
 8f86cee 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java
 b8a2ca6 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java
 eeeac9a 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java
 ba80279 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java
 c68aac9 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java
 9729570 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java
 1bfe6d1 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java
 e3e28c5 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java
 6ef2acb 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java
 ad4f8a5 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java
 ead37fb 
  
service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoReq.java
 b319b70