Created 04-19-2018 01:31 PM
Hi Folks,
I receive an error while running hive command. All the hive services are running fine.
Please see the log below and help me to fix this issue.
Note : tez.lib.uris of tez and hive are same.
$ hive log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender. Logging initialized using configuration in file:/etc/hive/2.6.1.0-129/0/hive-log4j.properties Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: File does not exist: /usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:560) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:233) at org.apache.hadoop.util.RunJar.main(RunJar.java:148) Caused by: java.io.FileNotFoundException: File does not exist: /usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz at org.apache.hadoop.hdfs.DistributedFileSystem$26.doCall(DistributedFileSystem.java:1446) at org.apache.hadoop.hdfs.DistributedFileSystem$26.doCall(DistributedFileSystem.java:1438) at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81) at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1438) at org.apache.hadoop.fs.FileSystem.resolvePath(FileSystem.java:770) at org.apache.tez.client.TezClientUtils.getLRFileStatus(TezClientUtils.java:130) at org.apache.tez.client.TezClientUtils.setupTezJarsLocalResources(TezClientUtils.java:181) at org.apache.tez.client.TezClient.getTezJarResources(TezClient.java:831) at org.apache.tez.client.TezClient.start(TezClient.java:355) at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.open(TezSessionState.java:197) at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.open(TezSessionState.java:116) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:557) ... 8 more
$ locate /usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz
/usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz
Created 04-20-2018 12:58 PM
Want to get a detailed solution you have to login/registered on the community
Register/LoginCreated 04-19-2018 01:43 PM
might be stupid, but did you check the file permissions? Has the user running the hive command permissions on the file?
Created 04-19-2018 02:10 PM
I'm running the hive command from hive user ID. And yes it has full permission for hive user.
[~] $ ls -l /usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz
-rwxrwxr-x 1 hive hadoop 51303070 May 31 2017 /usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz
Created 04-20-2018 08:56 AM
i guess your run from the shell just the command 'hive'? And your are doing this being logged in to the shell as the user 'hive'?
Created 04-20-2018 12:58 PM
Want to get a detailed solution you have to login/registered on the community
Register/LoginCreated 04-26-2018 02:38 PM
@Geoffrey Shelton Okot Thanks for your comment. beeline does work for me.
I just want to understand, Do you mean the hive CLI is no more? I should use beeline instead of hive command and on which user ID I should set the value
export USE_DEPRECATED_CLI=false
Created 04-26-2018 03:07 PM
In the below I used the hive user and password, Access to HiveServer2 in kerberized cluster using hive CLI has been deprecated. Example One
$ beeline $ ! connect jdbc:hive2://{hive_host}:10000/test
Here you MUST be the test database owner as you will be prompted for username / password see below prompts
Hs2 in kerberized cluster
Note the hive principal and REALM
$ beeline Beeline version 1.2.1000.2.5.3.0-37 by Apache Hive beeline> ! connect jdbc:hive2://france.paris.fr:10000/;principal=hive/france.paris.fr@PARIS.FR Connecting to jdbc:hive2://france.paris.fr:10000/;principal=hive/france.paris.fr@PARIS.FR
Will be prompted for username/password
Enter username for jdbc:hive2://france.paris.fr:10000/;principal=hive/france.paris.fr@PARIS.FR:{username} Enter password for jdbc:hive2://france.paris.fr:10000/;principal=hive/france.paris.fr@PARIS.FR:{password} Connected to: Apache Hive (version 1.2.1000.2.5.3.0-37) Driver: Hive JDBC (version 1.2.1000.2.5.3.0-37) Transaction isolation: TRANSACTION_REPEATABLE_READ 0: jdbc:hive2://france.paris.fr:10000/> show databases; +----------------+ | database_name | +----------------+ | default | | agricole | | achats | +----------------+--+ 3 rows selected (2.863 seconds) 0: jdbc:hive2://london.nakuru.com:10000> use agricole;