Member since
05-29-2016
35
Posts
3
Kudos Received
2
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
6279 | 04-12-2017 11:01 PM | |
6280 | 04-12-2017 10:56 PM |
03-03-2020
09:30 PM
1 Kudo
Could you run the administrator cmd not a normal one? From your error, I think you have not enough privilege to run these commands.
... View more
04-12-2017
11:01 PM
1 Kudo
Please use the impala jdbc not hive jdbc like this: [root@nightly59-unsecure-3 ~]# mkdir -p /root/impala-jdbc/jdbc
[root@nightly59-unsecure-3 ~]# hadoop classpath
/etc/hadoop/conf:/opt/cloudera/parcels/CDH-5.9.3-1.cdh5.9.3.p0.56/lib/hadoop/libexec/../../hadoop/lib/*:/opt/clo...
[root@nightly59-unsecure-3 ~]# cd /root/impala-jdbc/jdbc/
[root@nightly59-unsecure-3 jdbc]# ll
total 13584
-rwxr-xr-x 1 root root 1554773 Apr 10 23:46 ImpalaJDBC4.jar
-rwxr-xr-x 1 root root 1307923 Apr 10 23:46 TCLIServiceClient.jar
-rwxr-xr-x 1 root root 46725 Apr 10 23:45 commons-codec-1.3.jar
-rwxr-xr-x 1 root root 60686 Apr 10 23:45 commons-logging-1.1.1.jar
-rwxr-xr-x 1 root root 7670596 Apr 10 23:45 hive_metastore.jar
-rwxr-xr-x 1 root root 596600 Apr 10 23:45 hive_service.jar
-rwxr-xr-x 1 root root 352585 Apr 10 23:46 httpclient-4.1.3.jar
-rwxr-xr-x 1 root root 181201 Apr 10 23:46 httpcore-4.1.3.jar
-rwxr-xr-x 1 root root 275186 Apr 10 23:46 libfb303-0.9.0.jar
-rwxr-xr-x 1 root root 347531 Apr 10 23:46 libthrift-0.9.0.jar
-rwxr-xr-x 1 root root 367444 Apr 10 23:46 log4j-1.2.14.jar
-rwxr-xr-x 1 root root 294796 Apr 10 23:46 ql.jar
-rwxr-xr-x 1 root root 23671 Apr 10 23:46 slf4j-api-1.5.11.jar
-rwxr-xr-x 1 root root 9693 Apr 10 23:46 slf4j-log4j12-1.5.11.jar
-rwxr-xr-x 1 root root 792964 Apr 10 23:46 zookeeper-3.4.6.jar
[root@nightly59-unsecure-3 jdbc]# export HADOOP_CLASSPATH=`hadoop classpath`:/opt/cloudera/parcels/CDH-*/lib/hive/lib:/root/impala-jdbc/jdbc/*
[root@nightly59-unsecure-3 jdbc]# beeline
beeline> !connect 'jdbc:impala://nightly59-unsecure-3.gce.cloudera.com:21050;AuthMech=0'
Connecting to jdbc:impala://nightly59-unsecure-3.gce.cloudera.com:21050;AuthMech=0
Enter username for jdbc:impala://nightly59-unsecure-3.gce.cloudera.com:21050;AuthMech=0:
Enter password for jdbc:impala://nightly59-unsecure-3.gce.cloudera.com:21050;AuthMech=0:
Connected to: Impala (version 2.7.0-cdh5.9.x)
Driver: ImpalaJDBC (version 02.05.37.1057)
Error: [Simba][JDBC](11975) Unsupported transaction isolation level: 4. (state=HY000,code=11975)
0: jdbc:impala://nightly59-unsecure-3.gce.clo> show tables;
+------------+--+
| name |
+------------+--+
| customers |
| sample_07 |
| sample_08 |
| web_logs |
+------------+--+
4 rows selected (0.177 seconds)
0: jdbc:impala://nightly59-unsecure-3.gce.clo> select * from customers limit 5;
+--------+---------------------+--+
| id | name |
+--------+---------------------+--+
| 75012 | Dorothy Wilk |
| 17254 | Martin Johnson |
| 12532 | Melvin Garcia |
| 42632 | Raymond S. Vestal |
| 77913 | Betty J. Giambrone |
+--------+---------------------+--+
5 rows selected (0.523 seconds) For the detail information, please check this document. https://www.cloudera.com/documentation/enterprise/latest/topics/impala_jdbc.html
... View more