Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - 'set cli header' throws null pointer exception


Copy link to this message
-
Re: 'set cli header' throws null pointer exception
Mark Grover 2012-06-09, 14:03
Hi Saurabh,
I wasn't able to reproduce this problem on Apache Hive 0.9.0. Can you
please try the same procedure with another jar? Perhaps, one from hive's
lib directory like hive-builtins.jar?

Thanks for your input.

Mark

On Fri, Jun 1, 2012 at 8:21 PM, Saurabh S <[EMAIL PROTECTED]> wrote:

>
> The ${HIVE_HOME}/lib contains files like hive-*-0.7.1-cdh3u3.jar, so I
> guess it's version 0.7.1 provided by Cloudera.
>
> ----------------------------------------
> > From: [EMAIL PROTECTED]
> > Date: Fri, 1 Jun 2012 17:11:18 -0700
> > Subject: Re: 'set cli header' throws null pointer exception
> > To: [EMAIL PROTECTED]
> >
> > Which version of Hive are you running?
> >
> > On Fri, Jun 1, 2012 at 3:49 PM, Saurabh S <[EMAIL PROTECTED]> wrote:
> > >
> > > Well it seems that simply moving the set header statement after the
> 'create temporary function' statement works just fine.
> > >
> > > ----------------------------------------
> > >> From: [EMAIL PROTECTED]
> > >> To: [EMAIL PROTECTED]
> > >> Subject: 'set cli header' throws null pointer exception
> > >> Date: Fri, 1 Jun 2012 14:11:09 -0700
> > >>
> > >>
> > >> This is a weird issue. I've been setting hive CLI headers for a long
> time using the following:
> > >>
> > >> set hive.cli.print.header=true;
> > >>
> > >> Recently, I started using custom Hive UDF. Here is my test file,
> myfunc.sql:
> > >>
> > >> --
> > >> add jar <myjar>;
> > >> create temporary function <myfunc> as <appropriate path>;
> > >> <test query 1>;
> > >> <test query 2>;
> > >> --
> > >>
> > >> This works just fine. However, if I add the line hive cli header to
> the top, Hive crashes at line 2, i.e. the create temporary function with
> the following error:
> > >>
> > >> --
> > >> Added /home/somejar.jar to class path
> > >> Added resource: /home/somejar.jar
> > >> OK
> > >> Exception in thread "main" java.lang.NullPointerException
> > >>         at
> org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:221)
> > >>         at
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:286)
> > >>         at
> org.apache.hadoop.hive.cli.CliDriver.processReader(CliDriver.java:310)
> > >>         at
> org.apache.hadoop.hive.cli.CliDriver.processFile(CliDriver.java:317)
> > >>         at
> org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:490)
> > >>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > >>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > >>         at java.lang.reflect.Method.invoke(Method.java:597)
> > >>         at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
> > >> --
> > >>
> > >> Any idea what's going on?
> > >>
> > >> Regards,
> > >> Saurabh
> > >>
> > >
>
>