<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Unable to run hive command in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221313#M77448</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/20278/haraldberghoff.html" nodeid="20278"&gt;@Harald Berghoff&lt;/A&gt;&lt;P&gt;I'm running the hive command from hive user ID. And yes it has full permission for hive user. &lt;/P&gt;&lt;P&gt;[~] $ ls -l /usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz &lt;/P&gt;&lt;P&gt;-rwxrwxr-x 1 hive hadoop 51303070 May 31  2017 /usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 21:10:24 GMT</pubDate>
    <dc:creator>mvssaravana</dc:creator>
    <dc:date>2018-04-19T21:10:24Z</dc:date>
    <item>
      <title>Unable to run hive command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221311#M77446</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;I receive an error while running hive command. All the hive services are running fine.&lt;/P&gt;&lt;P&gt;Please see the log below and help me to fix this issue. &lt;/P&gt;&lt;P&gt;Note : tez.lib.uris of tez and hive are same. &lt;/P&gt;&lt;P&gt;$ 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&lt;/P&gt;&lt;P&gt;$ locate /usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz &lt;/P&gt;&lt;P&gt;/usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 20:31:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221311#M77446</guid>
      <dc:creator>mvssaravana</dc:creator>
      <dc:date>2018-04-19T20:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run hive command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221312#M77447</link>
      <description>&lt;P&gt;might be stupid, but did you check the file permissions? Has the user running the hive command permissions on the file?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 20:43:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221312#M77447</guid>
      <dc:creator>arald</dc:creator>
      <dc:date>2018-04-19T20:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run hive command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221313#M77448</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/20278/haraldberghoff.html" nodeid="20278"&gt;@Harald Berghoff&lt;/A&gt;&lt;P&gt;I'm running the hive command from hive user ID. And yes it has full permission for hive user. &lt;/P&gt;&lt;P&gt;[~] $ ls -l /usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz &lt;/P&gt;&lt;P&gt;-rwxrwxr-x 1 hive hadoop 51303070 May 31  2017 /usr/hdp/2.6.1.0-129/tez/lib/tez.tar.gz&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 21:10:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221313#M77448</guid>
      <dc:creator>mvssaravana</dc:creator>
      <dc:date>2018-04-19T21:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run hive command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221314#M77449</link>
      <description>&lt;P&gt;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'?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 15:56:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221314#M77449</guid>
      <dc:creator>arald</dc:creator>
      <dc:date>2018-04-20T15:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run hive command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221315#M77450</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="@Saravana V"&gt;@Saravana V&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Hive CLI is deprecated HiveServer2 in Hadoop 2.0 introduced its own CLI called Beeline, which is a JDBC client based on SQLLine. Due to new development being focused on HiveServer2, Hive CLI will soon be deprecated in favor of Beeline. &lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;To use the new Hive CLI on top of Beeline to implement the Hive CLI functionality set &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;export USE_DEPRECATED_CLI=false &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;I came across a case where ATLAS doesn't see objects (database or tables) created from Hive CLI so try using the beeline at the console type &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;$ beeline 
$ ! connect jdbc:hive2://{hive_host}:10000/{database} &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;You will be prompted for the username and the password.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 19:58:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221315#M77450</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2018-04-20T19:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run hive command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221316#M77451</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt; Thanks for your comment. beeline does work for me. &lt;/P&gt;&lt;P&gt;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 &lt;/P&gt;&lt;P&gt;&lt;EM&gt;export USE_DEPRECATED_CLI=false&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 21:38:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221316#M77451</guid>
      <dc:creator>mvssaravana</dc:creator>
      <dc:date>2018-04-26T21:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run hive command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221317#M77452</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.hortonworks.com/questions/186550/@Saravana%20V"&gt;@Saravana V&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;In the below I used the hive user and password, Access to HiveServer2 in kerberized cluster using hive CLI has been deprecated. &lt;STRONG&gt;Example One &lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;$ beeline 
$ ! connect jdbc:hive2://{hive_host}:10000/test &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Here you MUST be the test database owner as you will be prompted for &lt;B&gt;username&lt;/B&gt; / &lt;B&gt;password&lt;/B&gt; see below prompts &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Hs2 in kerberized cluster &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Note the hive principal and REALM &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;$ beeline 
Beeline version 1.2.1000.2.5.3.0-37 by Apache Hive 
beeline&amp;gt; ! 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 &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Will be prompted for username/password &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;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/&amp;gt; show databases; 
+----------------+ 
| database_name  | 
+----------------+ 
| default  | 
| agricole | 
| achats   | 
+----------------+--+ 
3 rows selected (2.863 seconds) 
0: jdbc:hive2://london.nakuru.com:10000&amp;gt; use agricole;&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 22:07:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-run-hive-command/m-p/221317#M77452</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2018-04-26T22:07:46Z</dc:date>
    </item>
  </channel>
</rss>

