Created 07-25-2017 09:01 PM
I am using Kerberos and Ranger both. I can see the tables in beeline but cant add a JAR .
[hdfs@hadoop1 ~]$ beeline -u 'jdbc:hive2://hadoop2:10000/default;principal=hive/hadoop2@TOLLS.DOT.STATE.FL.US' Connecting to jdbc:hive2://hadoop2:10000/default;principal=hive/hadoop2@TOLLS.DOT.STATE.FL.US Connected to: Apache Hive (version 1.2.1000.2.5.3.0-37) Driver: Hive JDBC (version 1.2.1000.2.5.3.0-37) Transaction isolation: TRANSACTION_REPEATABLE_READ Beeline version 1.2.1000.2.5.3.0-37 by Apache Hive 0: jdbc:hive2://hadoop2:10000/default> add JAR hdfs://hadoop2.tolls.dot.state.fl.us:8020/tmp/elasticsearch-hadoop-2.2.0.jar; Error: Error while processing statement: Failed to read external resource hdfs://hadoop2.tolls.dot.state.fl.us:8020/tmp/elasticsearch-hadoop-2.2.0.jar (state=,code=1) 0: jdbc:hive2://hadoop2:10000/default> [hdfs@hadoop1 ~]$ ^C [hdfs@hadoop1 ~]$ [hdfs@hadoop1 ~]$ [hdfs@hadoop1 ~]$ hdfs dfs -ls /tmp/elasticsearch-hadoop-2.2.0.jar -rwxrwxrwx 3 sami hdfs 756922 2017-07-25 16:30 /tmp/elasticsearch-hadoop-2.2.0.jar [hdfs@hadoop1 ~]$
Created 07-25-2017 09:36 PM
this fixed it
Beeline version 1.2.1000.2.5.3.0-37 by Apache Hive 0: jdbc:hive2://hadoop2:10000/default> add JAR hdfs:///tmp/elasticsearch-hadoop-2.2.0.jar 0: jdbc:hive2://hadoop2:10000/default> ; INFO : converting to local hdfs:///tmp/elasticsearch-hadoop-2.2.0.jar INFO : Added [/tmp/0ec20cad-4ed8-4174-9504-f3b24d285542_resources/elasticsearch-hadoop-2.2.0.jar] to class path INFO : Added resources: [hdfs:///tmp/elasticsearch-hadoop-2.2.0.jar] No rows affected (0.096 seconds) 0: jdbc:hive2://hadoop2:10000/default> list JAR; +-------------------------------------------------------------------------------------+--+ |
Created 07-25-2017 09:28 PM
if i use the "/tmp" path it does register but doesnt list ? i also moved the jar to the /tmp folder on hiverserver2.
0: jdbc:hive2://hadoop2:10000/default> add JAR /tmp/elasticsearch-hadoop-2.2.0.jar; INFO : Added [/tmp/elasticsearch-hadoop-2.2.0.jar] to class path INFO : Added resources: [/tmp/elasticsearch-hadoop-2.2.0.jar] No rows affected (0.043 seconds) 0: jdbc:hive2://hadoop2:10000/default> list JAR 0: jdbc:hive2://hadoop2:10000/default> list JAR; +-----------+--+ | resource | +-----------+--+ +-----------+--+ No rows selected (0.034 seconds)
Created 07-25-2017 09:36 PM
this fixed it
Beeline version 1.2.1000.2.5.3.0-37 by Apache Hive 0: jdbc:hive2://hadoop2:10000/default> add JAR hdfs:///tmp/elasticsearch-hadoop-2.2.0.jar 0: jdbc:hive2://hadoop2:10000/default> ; INFO : converting to local hdfs:///tmp/elasticsearch-hadoop-2.2.0.jar INFO : Added [/tmp/0ec20cad-4ed8-4174-9504-f3b24d285542_resources/elasticsearch-hadoop-2.2.0.jar] to class path INFO : Added resources: [hdfs:///tmp/elasticsearch-hadoop-2.2.0.jar] No rows affected (0.096 seconds) 0: jdbc:hive2://hadoop2:10000/default> list JAR; +-------------------------------------------------------------------------------------+--+ |