Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> 'set cli header' throws null pointer exception


+
Saurabh S 2012-06-01, 21:11
+
Saurabh S 2012-06-01, 22:49
+
Jakob Homan 2012-06-02, 00:11
+
Saurabh S 2012-06-02, 00:21
+
Mark Grover 2012-06-09, 14:03
Copy link to this message
-
Re: 'set cli header' throws null pointer exception
You're probably running into
https://issues.apache.org/jira/browse/HIVE-2334, which has been fixed
in Hive 0.8+.

On Sat, Jun 9, 2012 at 7:03 AM, Mark Grover <[EMAIL PROTECTED]> wrote:
> 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
>> > >>
>> > >
>>
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB