<?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 Mapreduce and HCatalog Integration - HCatOutputFormat ClassNotFoundException in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mapreduce-and-HCatalog-Integration-HCatOutputFormat/m-p/131587#M23114</link>
    <description>&lt;P&gt;I ran into issues while trying to read the hive table and write to a hive table using mapreduce.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Input and output:&lt;/STRONG&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;Input hive table:&lt;/EM&gt; mr_input_text&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Output hive table:&lt;/EM&gt; mr_output_text&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;Command that runs the MapReduce job&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;hadoop  jar mr-hcat.jar mr_input_text mr_output_text
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt; HDP 2.3.2&lt;/P&gt;&lt;P&gt;This fails with the following exception. Used "yarn logs -applicationId " command to get this log.&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;java.lang.RuntimeException: java.lang.ClassNotFoundException :class org.apache.hcatalog.mapreduce.HCatOutputFormat not found&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I tried setting the -libjars with the hcatalog core jar as follows, but still it fails.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;hadoop  jar mr-hcat.jar mr_input_text mr_output_text -libjars /usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;I tried running from both as hdfs and hive user.&lt;/LI&gt;&lt;LI&gt;Already looked at stackoverflow &lt;A href="http://stackoverflow.com/questions/14121769/hcatalog-with-mapreduce"&gt;link&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Thu, 17 Mar 2016 03:28:06 GMT</pubDate>
    <dc:creator>learninghuman</dc:creator>
    <dc:date>2016-03-17T03:28:06Z</dc:date>
    <item>
      <title>Mapreduce and HCatalog Integration - HCatOutputFormat ClassNotFoundException</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mapreduce-and-HCatalog-Integration-HCatOutputFormat/m-p/131587#M23114</link>
      <description>&lt;P&gt;I ran into issues while trying to read the hive table and write to a hive table using mapreduce.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Input and output:&lt;/STRONG&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;Input hive table:&lt;/EM&gt; mr_input_text&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Output hive table:&lt;/EM&gt; mr_output_text&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;Command that runs the MapReduce job&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;hadoop  jar mr-hcat.jar mr_input_text mr_output_text
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt; HDP 2.3.2&lt;/P&gt;&lt;P&gt;This fails with the following exception. Used "yarn logs -applicationId " command to get this log.&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;java.lang.RuntimeException: java.lang.ClassNotFoundException :class org.apache.hcatalog.mapreduce.HCatOutputFormat not found&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I tried setting the -libjars with the hcatalog core jar as follows, but still it fails.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;hadoop  jar mr-hcat.jar mr_input_text mr_output_text -libjars /usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;I tried running from both as hdfs and hive user.&lt;/LI&gt;&lt;LI&gt;Already looked at stackoverflow &lt;A href="http://stackoverflow.com/questions/14121769/hcatalog-with-mapreduce"&gt;link&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 17 Mar 2016 03:28:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mapreduce-and-HCatalog-Integration-HCatOutputFormat/m-p/131587#M23114</guid>
      <dc:creator>learninghuman</dc:creator>
      <dc:date>2016-03-17T03:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Mapreduce and HCatalog Integration - HCatOutputFormat ClassNotFoundException</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mapreduce-and-HCatalog-Integration-HCatOutputFormat/m-p/131588#M23115</link>
      <description>&lt;P&gt;have you looked at this page &lt;A href="https://cwiki.apache.org/confluence/display/Hive/HCatalog+InputOutput" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/HCatalog+InputOutput&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There are a bunch of dependencies you need to include&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 11:18:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mapreduce-and-HCatalog-Integration-HCatOutputFormat/m-p/131588#M23115</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-03-17T11:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Mapreduce and HCatalog Integration - HCatOutputFormat ClassNotFoundException</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mapreduce-and-HCatalog-Integration-HCatOutputFormat/m-p/131589#M23116</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervits&lt;/A&gt; HCatOutputFormat class is in fact in the jar  /usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar only. Actually its not about this specific class or jar to begin with; Its actually the command that i used; Changing it to the following works.&lt;/P&gt;&lt;P&gt;Note that the program arguments come at the end. The link that you suggested made me try this. Also, the other jars mentioned in the above link need to be added as it complained about other classes as well one by one. Those jars may be different based on the distribution and version.&lt;/P&gt;&lt;P&gt;In HDP 2.3.2 i did the following&lt;/P&gt;&lt;PRE&gt;export HCAT_HOME=/usr/hdp/current/hive-webhcat
export HIVE_HOME=/usr/hdp/current/hive-client


export LIB_JARS=$HCAT_HOME/share/hcatalog/hive-hcatalog-core.jar,$HIVE_HOME/lib/hive-metastore.jar,$HIVE_HOME/lib/libthrift-0.9.2.jar,$HIVE_HOME/lib/hive-exec.jar,$HIVE_HOME/lib/libfb303-0.9.2.jar,$HIVE_HOME/lib/jdo-api-3.0.1.jar,$HIVE_HOME/lib/datanucleus-api-jdo-3.2.6.jar


hadoop  jar mr-hcat.jar &amp;lt;mainclass&amp;gt; -libjars ${LIB_JARS} mr_input_text mr_output_text&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Mar 2016 21:48:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mapreduce-and-HCatalog-Integration-HCatOutputFormat/m-p/131589#M23116</guid>
      <dc:creator>learninghuman</dc:creator>
      <dc:date>2016-03-17T21:48:06Z</dc:date>
    </item>
  </channel>
</rss>

