Home | About | Sematext search-lucene.com search-hadoop.com
 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
Copy link to this message
-
Re: 'set cli header' throws null pointer exception
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
>>
>
+
Saurabh S 2012-06-02, 00:21
+
Mark Grover 2012-06-09, 14:03
+
Jakob Homan 2012-06-12, 17:27