Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Using Hive through JDBCInterpreter in Zeppelin

avatar
Explorer

I am trying to perform a "show tables;" on Hive using the JDBCInterpreter. I have set up all usernames, passwords and URLs for the interpreter und added hive-jdbc, hadoop-common and hive-shims as dependencies. In the UI I do not get an explicit error - just no result. In the .out log file I can see following:

23:58:51.342 [pool-3-thread-2] ERROR org.apache.zeppelin.jdbc.JDBCInterpreter - zeppelin will be ignored. driver.zeppelin and zeppelin.url is mandatory. 23:58:51.349 [pool-3-thread-2] ERROR org.apache.zeppelin.scheduler.Job - Job failed java.lang.NoSuchMethodError: org.apache.commons.lang3.StringUtils.isAnyEmpty([Ljava/lang/CharSequence;)Z at org.apache.zeppelin.jdbc.JDBCInterpreter.open(JDBCInterpreter.java:170) ~[zeppelin-jdbc-0.6.0.2.5.0.0-1245.jar:0.6.0.2.5.0.0-1245] at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:69) ~[zeppelin-interpreter-0.6.0.2.5.0.0-1245.jar:0.6.0.2.5.0.0-1245] at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93) ~[zeppelin-interpreter-0.6.0.2.5.0.0-1245.jar:0.6.0.2.5.0.0-1245] at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:341) ~[zeppelin-interpreter-0.6.0.2.5.0.0-1245.jar:0.6.0.2.5.0.$ at org.apache.zeppelin.scheduler.Job.run(Job.java:176) [zeppelin-interpreter-0.6.0.2.5.0.0-1245.jar:0.6.0.2.5.0.0-1245] at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162) [zeppelin-interpreter-0.6.0.2.5.0.0-1245.jar:0.6.0.2.5.0.0-1245] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_60] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_60] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_60] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_60] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]
1 ACCEPTED SOLUTION

avatar
Rising Star

@Sebastian Hätälä

Do your cluster have connection to the internet ? I had the same issue and got to know that zeppelin download required jars using maven according to the versions of the component. So we need to have compatible jars, for example I did download jars from maven manually but they were of latest version and surprisingly it didn't work and I have to download older jars.

View solution in original post

8 REPLIES 8

avatar
Super Guru
@Sebastian Hätälä

Can you provide the string you are using for the JDBC interpreter? By default, the %jdbc interpreter is intended to be used with Postgres. Check your interpreter settings. You may have to use %jdbc(hive) as your interpreter string.

avatar
Explorer

Hi Michael, I did try %hive and %jdbc(hive) both with the same result.

avatar

@Sebastian can you take a screenshot or copy and paste your interpreter settings pls?

avatar
Explorer

I did try the following two, both with the same result:

jdbc:hive2://zkserver1.company.com:2181,zkserver2.company.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
jdbc:hive2://hiveserver2.company.com:10000

avatar
Rising Star

@Sebastian Hätälä Did you manage to solve it ?

avatar

@Sebastian

Please post which HDP version are you on? Also by any chance, is your cluster wire encrypted? Also please post your interpreter settings snapshot as mentioned in one of the earlier comments

avatar
Rising Star

@Sebastian Hätälä

Do your cluster have connection to the internet ? I had the same issue and got to know that zeppelin download required jars using maven according to the versions of the component. So we need to have compatible jars, for example I did download jars from maven manually but they were of latest version and surprisingly it didn't work and I have to download older jars.

avatar
Cloudera Employee
@Sebastian Hätälä

Were you able to resolve this, what is the version of hive-jdbc, hadoop-common and hive-shims are you using ?

java.lang.NoSuchMethodError: org.apache.commons.lang3.StringUtils.isAnyEmpty Sounds like issue with some jar version. I use following as dependencies; let me know if this works.

org.apache.hive:hive-jdbc:2.0.1

org.apache.hadoop:hadoop-common:2.7.2

org.apache.hive.shims:hive-shims-0.23:2.1.0