Create hive UDF in zeppelin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Create hive UDF in zeppelin

Anandha L Ranganathan
I have created a new interpreter called "hive"  in zeppelin using jdbc interpreter. Using that interpreter, I can run queries on Hive.

I am trying to  create a UDFs but it is failing.


%hive
ADD JAR /mnt/data/apps/hiveUDF/hiveGdUDF-current.jar;
org.apache.hive.service.cli.HiveSQLException: Error while processing statement: /mnt/data/apps/hiveUDF/hiveGdUDF-current.jar; does not exist at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:231) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:217) at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.apache.zeppelin.jdbc.JDBCInterpreter.executeSql(JDBCInterpreter.java:719) at org.apache.zeppelin.jdbc.JDBCInterpreter.interpret(JDBCInterpreter.java:800) at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:101) at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:602) at org.apache.zeppelin.scheduler.Job.run(Job.java:182) at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)

How do I create Hive UDFs in Zeppelin ?

Thanks
Anand
 
Reply | Threaded
Open this post in threaded view
|

Re: Create hive UDF in zeppelin

Jeff Zhang

The message is clear that the jar doesn't exist, please check the jar file

Anandha L Ranganathan <[hidden email]>于2017年11月26日周日 下午1:27写道:
I have created a new interpreter called "hive"  in zeppelin using jdbc interpreter. Using that interpreter, I can run queries on Hive.

I am trying to  create a UDFs but it is failing.


%hive
ADD JAR /mnt/data/apps/hiveUDF/hiveGdUDF-current.jar;
org.apache.hive.service.cli.HiveSQLException: Error while processing statement: /mnt/data/apps/hiveUDF/hiveGdUDF-current.jar; does not exist at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:231) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:217) at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.apache.zeppelin.jdbc.JDBCInterpreter.executeSql(JDBCInterpreter.java:719) at org.apache.zeppelin.jdbc.JDBCInterpreter.interpret(JDBCInterpreter.java:800) at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:101) at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:602) at org.apache.zeppelin.scheduler.Job.run(Job.java:182) at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)

How do I create Hive UDFs in Zeppelin ?

Thanks
Anand
 
Reply | Threaded
Open this post in threaded view
|

Re: Create hive UDF in zeppelin

Anandha L Ranganathan
The jar exists on the hiveserver and it works fine when I am trying from beeline.

Does the jar needs to be present in the zeppelin server or local server where zeppelin is running ?

On Sun, Nov 26, 2017 at 3:44 AM, Jeff Zhang <[hidden email]> wrote:

The message is clear that the jar doesn't exist, please check the jar file

Anandha L Ranganathan <[hidden email]>于2017年11月26日周日 下午1:27写道:
I have created a new interpreter called "hive"  in zeppelin using jdbc interpreter. Using that interpreter, I can run queries on Hive.

I am trying to  create a UDFs but it is failing.


%hive
ADD JAR /mnt/data/apps/hiveUDF/hiveGdUDF-current.jar;
org.apache.hive.service.cli.HiveSQLException: Error while processing statement: /mnt/data/apps/hiveUDF/hiveGdUDF-current.jar; does not exist at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:231) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:217) at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.apache.zeppelin.jdbc.JDBCInterpreter.executeSql(JDBCInterpreter.java:719) at org.apache.zeppelin.jdbc.JDBCInterpreter.interpret(JDBCInterpreter.java:800) at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:101) at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:602) at org.apache.zeppelin.scheduler.Job.run(Job.java:182) at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)

How do I create Hive UDFs in Zeppelin ?

Thanks
Anand