Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hive CLI filenotfoundexception

avatar
Expert Contributor

I am trying to run hive from the CLI:

HADOOP_USER_NAME=hdfs hive -hiveconf hive.cli.print.header=true -hiveconf hive.support.sql11.reserved.keywords=false -hiveconf hive.aux.jars.path=/usr/hdp/2.6.0.3-8/hive/lib/json-serde-1.3.7-jar-with-dependencies.jar -hiveconf hive.root.logger=DEBUG,console

but I get this error:

java.lang.RuntimeException: java.io.FileNotFoundException: File does not exist: hdfs://master.royble.co.uk:8020/user/hdfs/ /home/ed/Downloads/serde/json-serde-1.3.7-jar-with-dependencies.jar

I have had so many problems with that jar, that I originally used to create a Hive table. Normally I would do an 'add jar' but I cannot start Hive to do that. I have tried adding the jar to hive-env, /usr/hdp/<version>/hive/auxlib (on the hive machine) and hive.aux.jars.path but nothing works.

Any idea why Hive is looking for that odd path, or in fact why it is looking for it at all? FYI: master is not the machine with hive on it but it is where I run Ambari.

The path /home/ed/Downloads/serde is one I have used in the past but can remember when.

Using HDP-2.6.0.3.

Any help is much appreciated as this is driving me mad!

1 ACCEPTED SOLUTION

avatar
Expert Contributor

It was a setting in tez.lib.uris. Changed it to:

/hdp/apps/${hdp.version}/tez/tez.tar.gz,hdfs://master.royble.co.uk:8020/jars/json-serde-1.3.7-jar-with-dependencies.jar

(Note: no space after comma and hdfs path).

View solution in original post

3 REPLIES 3

avatar

Can you check and post what HIVE_AUX_JARS_PATH is set to in /etc/hive/conf/hive-env.sh?

avatar
Expert Contributor

Thanks Deepesh. It is:

HIVE_AUX_JARS_PATH=/usr/hdp/2.6.0.3-8/hive/lib/json-serde-1.3.7-jar-with-dependencies.jar
      if [ "${HIVE_AUX_JARS_PATH}" != "" ]; then
        if [ -f "${HIVE_AUX_JARS_PATH}" ]; then
          export HIVE_AUX_JARS_PATH=${HIVE_AUX_JARS_PATH}
        elif [ -d "/usr/hdp/current/hive-webhcat/share/hcatalog" ]; then
          export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar
        fi
      elif [ -d "/usr/hdp/current/hive-webhcat/share/hcatalog" ]; then
        export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar
      fi

avatar
Expert Contributor

It was a setting in tez.lib.uris. Changed it to:

/hdp/apps/${hdp.version}/tez/tez.tar.gz,hdfs://master.royble.co.uk:8020/jars/json-serde-1.3.7-jar-with-dependencies.jar

(Note: no space after comma and hdfs path).