hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saurabh S <>
Subject 'set cli header' throws null pointer exception
Date Fri, 01 Jun 2012 21:11:09 GMT

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
Exception in thread "main" java.lang.NullPointerException
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(
        at org.apache.hadoop.hive.cli.CliDriver.processLine(
        at org.apache.hadoop.hive.cli.CliDriver.processReader(
        at org.apache.hadoop.hive.cli.CliDriver.processFile(
        at org.apache.hadoop.hive.cli.CliDriver.main(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.apache.hadoop.util.RunJar.main(

Any idea what's going on?

View raw message