How to setup Hive JDBC client to connect remote Hiveserver

2016-04-03 Thread brajmohan saxena
Hi,

Could you please tell me how to connect a simple JDBC program to remote
Hiveserver2 with default Derby database.

I have Hiveserver2 running on remote machine and i am trying to run simple
JDBC program from client machine (
DriverManager.getConnection("jdbc:hive2://192.168.1.103:1/default", "",
""); )

but getting the following error.

Error: Could not open client transport with JDBC Uri: jdbc:hive2://
192.168.1.103:10001: java.net.ConnectException: Connection refused
(state=08S01,code=0)

Do I need to change hive-site.xml file at server side.

Thanks in advance

Regards

Braj


Re: Review Request 44031: HIVE-13130: HS2 changes: API calls for retrieving primary keys and foreign keys information

2016-04-03 Thread Carl Steinbach

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




service-rpc/if/TCLIService.thrift (line 958)


Please add doc comments for the two new *Req types (TGetFunctionsReq is a 
good example). If the behavior is expected to match the corresponding JDBC 
calls, please state so in the comment.


- Carl Steinbach


On March 29, 2016, 12:11 a.m., Hari Sankar Sivarama Subramaniyan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44031/
> ---
> 
> (Updated March 29, 2016, 12:11 a.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> HS2 changes: API calls for retrieving primary keys and foreign keys 
> information. Changes without the generated thrift files.
> 
> 
> Diffs
> -
> 
>   jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java 7e54d1f 
>   service-rpc/if/TCLIService.thrift aa28b6e 
>   service-rpc/src/gen/thrift/gen-cpp/TCLIService.h 3407564 
>   service-rpc/src/gen/thrift/gen-cpp/TCLIService.cpp fc82b88 
>   service-rpc/src/gen/thrift/gen-cpp/TCLIService_server.skeleton.cpp 66ed6a7 
>   service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.h 7f1d9dd 
>   service-rpc/src/gen/thrift/gen-cpp/TCLIService_types.cpp 3a27a60 
>   
> service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java
>  c684f89 
>   service-rpc/src/gen/thrift/gen-php/TCLIService.php eba62f1 
>   service-rpc/src/gen/thrift/gen-php/Types.php b7df50a 
>   service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService-remote 56f5c5d 
>   service-rpc/src/gen/thrift/gen-py/TCLIService/TCLIService.py ad2d71d 
>   service-rpc/src/gen/thrift/gen-py/TCLIService/ttypes.py c691781 
>   service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service.rb 7d7f7a7 
>   service-rpc/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb 07ed97c 
>   service/src/java/org/apache/hive/service/cli/CLIService.java ab30ae2 
>   service/src/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java 
> 9cad5be 
>   service/src/java/org/apache/hive/service/cli/ICLIService.java 0a54bdd 
>   
> service/src/java/org/apache/hive/service/cli/operation/GetCrossReferenceOperation.java
>  PRE-CREATION 
>   
> service/src/java/org/apache/hive/service/cli/operation/GetPrimaryKeysOperation.java
>  PRE-CREATION 
>   
> service/src/java/org/apache/hive/service/cli/operation/OperationManager.java 
> 56a9c18 
>   service/src/java/org/apache/hive/service/cli/session/HiveSession.java 
> 4f4e92d 
>   service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 
> 80a1844 
>   
> service/src/java/org/apache/hive/service/cli/thrift/RetryingThriftCLIServiceClient.java
>  14191e5 
>   service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java 
> 62fcde5 
>   
> service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java
>  ccce6dc 
> 
> Diff: https://reviews.apache.org/r/44031/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Hari Sankar Sivarama Subramaniyan
> 
>



Review Request 45658: HIVE-13373 : Use most specific type for numerical constants

2016-04-03 Thread Ashutosh Chauhan

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

Review request for hive and Jason Dere.


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


Repository: hive-git


Description
---

Currently integer & tinyint/bigint comparisons happen in double. They should 
happen in integer instead.


Diffs
-

  ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 45dfd27 
  ql/src/test/queries/clientpositive/type_widening.q b504cf9 
  ql/src/test/results/clientpositive/infer_const_type.q.out bd42f05 
  ql/src/test/results/clientpositive/spark/vectorization_0.q.out aeb6fb8 
  ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out 
e9fb1e8 
  ql/src/test/results/clientpositive/tez/vectorization_0.q.out c790578 
  ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out 
32fdef6 
  ql/src/test/results/clientpositive/type_widening.q.out 84e53f8 
  ql/src/test/results/clientpositive/vectorization_0.q.out 53dffed 
  ql/src/test/results/clientpositive/vectorization_short_regress.q.out 91c10f0 

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


Testing
---

New test & regression suite.


Thanks,

Ashutosh Chauhan



[jira] [Created] (HIVE-13414) Analytic functions windowing (preceding/following) does not work has expected

2016-04-03 Thread Dudu Markovitz (JIRA)
Dudu Markovitz created HIVE-13414:
-

 Summary:  Analytic functions windowing (preceding/following) does 
not work has expected
 Key: HIVE-13414
 URL: https://issues.apache.org/jira/browse/HIVE-13414
 Project: Hive
  Issue Type: Bug
Affects Versions: 0.14.0
Reporter: Dudu Markovitz


"min (j) over (order by i rows between 1 preceding and 1 preceding)"
is logically equal to 
"lag (j) over (order by i)"

"min (j) over (order by i rows between 1 following and 1 following)"
is logically equal to 
"lead (j) over (order by i)"

Has can be seen in the following examples lag/lead works fine but the logically 
equivalent syntax that uses preceding/following returns wrong results.


$ cat>t.txt
23,29
84,15
58,19
81,17
48,15
36,49
91,26
89,22
63,57
33,10
$ hdfs dfs -mkdir /user/dmarkovitz/t
$ hdfs dfs -put t.txt /user/dmarkovitz/t
$ hive
hive> create external table t (i int,j int) row format delimited fields 
terminated by ',' location '/user/dmarkovitz/t';
hive> select * from t;
23  29
84  15
58  19
81  17
48  15
36  49
91  26
89  22
63  57
33  10
hive> select i,j,lag (j) over (order by i) as lag,min (j) over (order by i rows 
between 1 preceding and 1 preceding) as pseudo_lag from t;
23  29  NULL10
33  10  29  10
36  49  10  10
48  15  49  15
58  19  15  15
63  57  19  17
81  17  57  15
84  15  17  15
89  22  15  15
91  26  22  22


hive> select i,j,lead (j) over (order by i) as lead,min (j) over (order by i 
rows between 1 following and 1 following) as pseudo_lead from t order by i;
23  29  10  10
33  10  49  10
36  49  15  10
48  15  19  15
58  19  57  15
63  57  17  17
81  17  15  15
84  15  22  15
89  22  26  15
91  26  NULL22





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