Created 03-14-2016 04:16 AM
Aggregate functions on hive queries are not working for me on Zeppelin HDP 2.4 cluster. Zeppelin version: zeppelin-server-0.6.0.2.4.0.0-169.jar
I run "show tables" and it works fine. I am able to delete, create and load tables. I am able to select * from table. However if I run a any select count(*), sum(*), etc query it immeditaly fails:
java.lang.NullPointerException at org.apache.zeppelin.hive.HiveInterpreter.getConnection(HiveInterpreter.java:184) at org.apache.zeppelin.hive.HiveInterpreter.getStatement(HiveInterpreter.java:204) at org.apache.zeppelin.hive.HiveInterpreter.executeSql(HiveInterpreter.java:233) at org.apache.zeppelin.hive.HiveInterpreter.interpret(HiveInterpreter.java:328) at org.apache.zeppelin.interpreter.ClassloaderInterpreter.interpret(ClassloaderInterpreter.java:57) at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93) at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:295) at org.apache.zeppelin.scheduler.Job.run(Job.java:171) at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 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)
I ran the same query on beeline and it returned results fine.
Created 03-31-2016 05:50 PM
@Guilherme Braccialli I found the issue. I had to restart the interpertur and rebind the variables in zeppelin.
Created on 03-16-2016 02:45 AM - edited 08-19-2019 03:13 AM
I tried aggregate functions with Zeppelin + Sandbox 2.4 and it worked for me.
Are you using %sql interpreter, %pyspark or scala interpreter? Could you please paste full command you are trying to execute?
See my screenshot with %sql example.
Created 03-16-2016 03:14 AM
@Guilherme Braccialli That is interesting. I am doing it on a hdp 2.4 cluster (not sandbox). curious now....
Created 03-16-2016 03:23 AM
@Guilherme Braccialli I am using %sql
Created 03-31-2016 05:50 PM
@Guilherme Braccialli I found the issue. I had to restart the interpertur and rebind the variables in zeppelin.
Created 04-12-2016 01:31 PM
Hello sunile
Zeppelin in 2.4 has a bug that has been fixed since then. If you issue any query with a "()" the new parser for prefix will get lost. In your log if your query is "%hive select count(*)" from table you will see the query being sent look like "elect count(*) from table"
This is because the parser looks for a "(prefix_name)" and here mistakes "(*)" for a prefix.
The workaround is use %hive(default) or wait for next release
Created 06-09-2016 12:17 PM
I'm getting same error in HDP 2.4 sandbox, if use %hive on Zeppelin and then aggregate functions are not working...
%hive select count(*) from health_table java.lang.NullPointerException at org.apache.zeppelin.hive.HiveInterpreter.getConnection(HiveInterpreter.java:184) at org.apache.zeppelin.hive.HiveInterpreter.getStatement(HiveInterpreter.java:204) at org.apache.zeppelin.hive.HiveInterpreter.executeSql(HiveInterpreter.java:233) at org.apache.zeppelin.hive.HiveInterpreter.interpret(HiveInterpreter.java:328) at org.apache.zeppelin.interpreter.ClassloaderInterpreter.interpret(ClassloaderInterpreter.java:57) at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93) at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:295) at org.apache.zeppelin.scheduler.Job.run(Job.java:171) at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
This issue resolved when i use %sql.
I know your issue is not to related HDP sandbox 2.4 but may be this comment help someone using %hive on HDP sandbox 2.4.