<?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 Unable to execute add jar command as mentioned in Exercise 2 in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41918#M3865</link>
    <description>&lt;P&gt;I did finished cloudera exercise 1 successfully on CDH 5 and now I am trying to replicate below same scenario in cloudera url on CDH 5:-&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="http://www.cloudera.com/developers/get-started-with-hadoop-tutorial/exercise-2.html" target="_blank" rel="nofollow"&gt;http://www.cloudera.com/developers/get-started-with-hadoop-tutorial/exercise-2.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exact command cloudera gave is ADD JAR {{lib_dir}}/hive/lib/hive-contrib.jar;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem is when i issue below command in HIVE query editor:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADD JAR /home/cloudera/lib/hive-contrib.jar;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hive query editor says:-&lt;/P&gt;&lt;P&gt;Your query has the following error(s):&lt;/P&gt;&lt;P&gt;Error while processing statement: /home/cloudera/lib/hive-contrib.jar does not exist&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are 2 issues for which i need solution:-&lt;/P&gt;&lt;P&gt;1)I am unable to find hive/lib directory on CDH 5&lt;BR /&gt;2)How to import these jar on on Hive/lib directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My main intention is to get output of below query after invalidate metadata command from Impala&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;select count(*),url from tokenized_access_logs
where url like '%\/product\/%'
group by url order by count(*) desc;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;But though i see&amp;nbsp;tokenized_access_logs created at left hand side of HUE but i see no results of above query so i doubt that reason is that add jar command was not executed successfully above hence i am not getting output,can someone suggest how do i successfully execute Add jar command&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added the screenshot of my VM which shows&amp;nbsp;&lt;SPAN&gt;tokenized_access_logs created but no data when i run&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;select count(*),url from tokenized_access_logs
where url like '%\/product\/%'
group by url order by count(*) desc;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="no results.JPG" style="width: 200px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/1830i467D0DC621546291/image-size/small?v=v2&amp;amp;px=200" role="button" title="no results.JPG" alt="no results.JPG" /&gt;&lt;/span&gt;﻿&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also added is the error when i ran jar add jar &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="no results.JPG" style="width: 600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/1831i570C03AFD1E28304/image-size/large?v=v2&amp;amp;px=999" role="button" title="no results.JPG" alt="no results.JPG" /&gt;&lt;/span&gt;﻿&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 10:24:41 GMT</pubDate>
    <dc:creator>Tdas</dc:creator>
    <dc:date>2022-09-16T10:24:41Z</dc:date>
    <item>
      <title>Unable to execute add jar command as mentioned in Exercise 2</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41918#M3865</link>
      <description>&lt;P&gt;I did finished cloudera exercise 1 successfully on CDH 5 and now I am trying to replicate below same scenario in cloudera url on CDH 5:-&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="http://www.cloudera.com/developers/get-started-with-hadoop-tutorial/exercise-2.html" target="_blank" rel="nofollow"&gt;http://www.cloudera.com/developers/get-started-with-hadoop-tutorial/exercise-2.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exact command cloudera gave is ADD JAR {{lib_dir}}/hive/lib/hive-contrib.jar;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem is when i issue below command in HIVE query editor:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADD JAR /home/cloudera/lib/hive-contrib.jar;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hive query editor says:-&lt;/P&gt;&lt;P&gt;Your query has the following error(s):&lt;/P&gt;&lt;P&gt;Error while processing statement: /home/cloudera/lib/hive-contrib.jar does not exist&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are 2 issues for which i need solution:-&lt;/P&gt;&lt;P&gt;1)I am unable to find hive/lib directory on CDH 5&lt;BR /&gt;2)How to import these jar on on Hive/lib directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My main intention is to get output of below query after invalidate metadata command from Impala&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;select count(*),url from tokenized_access_logs
where url like '%\/product\/%'
group by url order by count(*) desc;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;But though i see&amp;nbsp;tokenized_access_logs created at left hand side of HUE but i see no results of above query so i doubt that reason is that add jar command was not executed successfully above hence i am not getting output,can someone suggest how do i successfully execute Add jar command&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added the screenshot of my VM which shows&amp;nbsp;&lt;SPAN&gt;tokenized_access_logs created but no data when i run&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;select count(*),url from tokenized_access_logs
where url like '%\/product\/%'
group by url order by count(*) desc;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="no results.JPG" style="width: 200px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/1830i467D0DC621546291/image-size/small?v=v2&amp;amp;px=200" role="button" title="no results.JPG" alt="no results.JPG" /&gt;&lt;/span&gt;﻿&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also added is the error when i ran jar add jar &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="no results.JPG" style="width: 600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/1831i570C03AFD1E28304/image-size/large?v=v2&amp;amp;px=999" role="button" title="no results.JPG" alt="no results.JPG" /&gt;&lt;/span&gt;﻿&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:24:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41918#M3865</guid>
      <dc:creator>Tdas</dc:creator>
      <dc:date>2022-09-16T10:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to find lib path in CDH5 toadd jar using below command on CDH 5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41919#M3866</link>
      <description>&lt;P&gt;to resolve this i copied&amp;nbsp;&lt;SPAN&gt;hive-contrib.jar from google and copied using wget to&amp;nbsp;/user/hive/lib/ then &amp;nbsp;&lt;/SPAN&gt;i ran query in Impala as&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADD JAR /user/hive/lib/hive-contrib.jar;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But below exception thrown&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AnalysisException: Syntax error in line 1: ADD JAR /user/hive/lib/hive-contrib.jar ^ Encountered: ADD Expected: ALTER, COMPUTE, CREATE, DESCRIBE, DROP, EXPLAIN, GRANT, INSERT, INVALIDATE, LOAD, REFRESH, REVOKE, SELECT, SET, SHOW, TRUNCATE, USE, VALUES, WITH CAUSED BY: Exception: Syntax error&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 00:01:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41919#M3866</guid>
      <dc:creator>Tdas</dc:creator>
      <dc:date>2016-06-13T00:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to find lib path in CDH5 toadd jar using below command on CDH 5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41927#M3867</link>
      <description>&amp;gt; Exact command cloudera gave is ADD JAR {{lib_dir}}/hive/lib/hive-contrib.jar;&lt;BR /&gt;&amp;gt; 1)I am unable to find hive/lib directory on CDH 5&lt;BR /&gt;&lt;BR /&gt;The {{lib_dir}} on CDH installed environments for Hive would either be /usr/lib/hive/ or /opt/cloudera/parcels/CDH/lib/hive/ (depending on packages or parcels being in use).</description>
      <pubDate>Mon, 13 Jun 2016 05:06:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41927#M3867</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2016-06-13T05:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to find lib path in CDH5 toadd jar using below command on CDH 5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41948#M3868</link>
      <description>Note that there are many variables in that tutorial you'll need to replace&lt;BR /&gt;with your own values. A copy of the tutorial with all the blanks filled in&lt;BR /&gt;and the required datasets are available in the QuickStart VM.&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Jun 2016 14:14:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41948#M3868</guid>
      <dc:creator>Sean</dc:creator>
      <dc:date>2016-06-13T14:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to find lib path in CDH5 toadd jar using below command on CDH 5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41974#M3869</link>
      <description>&lt;P&gt;Thanks Harsha , I mean it&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 05:27:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/41974#M3869</guid>
      <dc:creator>Tdas</dc:creator>
      <dc:date>2016-06-14T05:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to find lib path in CDH5 toadd jar using below command on CDH 5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/48363#M3870</link>
      <description>for me it works :&lt;BR /&gt;/usr/lib/hive/lib/hive-contrib.jar</description>
      <pubDate>Wed, 07 Dec 2016 17:53:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/48363#M3870</guid>
      <dc:creator>Gulshan</dc:creator>
      <dc:date>2016-12-07T17:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to execute add jar command as mentioned in Exercise 2</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/60237#M3871</link>
      <description>&lt;P&gt;I have removed the ADD JAR command (not supported in Impala) for the Tutorial Exercise 2 and Impala at Hue.&lt;/P&gt;&lt;P&gt;It worked, but the data has not been parsed correctly so we should use Hive query editor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also there is note for HiveServer2 (&lt;A href="https://www.cloudera.com/documentation/enterprise/5-6-x/topics/cm_mc_hive_udf.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-6-x/topics/cm_mc_hive_udf.html&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can find the library location in Linux:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[cloudera@quickstart hive]$ sudo su -&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[root@quickstart ~]# find / -name hive-contrib.jar&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/var/lib/hadoop-yarn/cache/yarn/nm-local-dir/usercache/cloudera/filecache/1019/hive-contrib.jar&lt;BR /&gt;/var/lib/hadoop-yarn/cache/yarn/nm-local-dir/usercache/cloudera/filecache/114/hive-contrib.jar&lt;BR /&gt;/var/lib/hadoop-yarn/cache/yarn/nm-local-dir/usercache/cloudera/filecache/476/hive-contrib.jar&lt;BR /&gt;/var/lib/hadoop-yarn/cache/yarn/nm-local-dir/usercache/cloudera/filecache/295/hive-contrib.jar&lt;BR /&gt;/var/lib/hadoop-yarn/cache/yarn/nm-local-dir/usercache/cloudera/filecache/838/hive-contrib.jar&lt;BR /&gt;/var/lib/hadoop-yarn/cache/yarn/nm-local-dir/usercache/cloudera/filecache/657/hive-contrib.jar&lt;BR /&gt;/usr/lib/hive/lib/hive-contrib.jar&lt;BR /&gt;/usr/lib/oozie/oozie-sharelib-mr1/lib/hive/hive-contrib.jar&lt;BR /&gt;/usr/lib/oozie/oozie-sharelib-yarn/lib/hive/hive-contrib.jar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Sep 2017 00:49:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/60237#M3871</guid>
      <dc:creator>pooh06</dc:creator>
      <dc:date>2017-09-23T00:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to find lib path in CDH5 toadd jar using below command on CDH 5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/65776#M3872</link>
      <description>&lt;P&gt;I Found the jar file was in this directory:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[cloudera@quickstart lib]$ find ./ -name hive-contrib.jar&lt;BR /&gt;./hive/lib/hive-contrib.jar&lt;BR /&gt;./oozie/oozie-sharelib-mr1/lib/hive/hive-contrib.jar&lt;BR /&gt;./oozie/oozie-sharelib-yarn/lib/hive/hive-contrib.jar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[cloudera@quickstart lib]$ pwd&lt;BR /&gt;/usr/lib/hive/lib&lt;BR /&gt;[cloudera@quickstart lib]$ ls -ltr hive-contrib.jar&lt;BR /&gt;lrwxrwxrwx 1 root root 32 Oct 23 09:59 hive-contrib.jar -&amp;gt; hive-contrib-1.1.0-cdh5.13.0.jar&lt;BR /&gt;[cloudera@quickstart lib]$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then used the same&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;ADD JAR /usr/lib/hive/lib/hive-contrib.jar&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it worked.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 17:01:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Unable-to-execute-add-jar-command-as-mentioned-in-Exercise-2/m-p/65776#M3872</guid>
      <dc:creator>dewdrop</dc:creator>
      <dc:date>2018-03-26T17:01:43Z</dc:date>
    </item>
  </channel>
</rss>

