<?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: HBase MapReduce job in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120107#M82881</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1262/az.html" nodeid="1262"&gt;@Avraha Zilberman&lt;/A&gt; have you looked at &lt;A href="http://hbase.apache.org/0.94/book/mapreduce.example.html"&gt;these&lt;/A&gt; examples? Can you show your pom file as well? You'd ususally call a built-in utility for HBase like so&lt;/P&gt;&lt;PRE&gt;TableMapReduceUtil.initTableMapperJob(
  tableName,        // input HBase table name
  scan,             // Scan instance to control CF and attribute selection
  MyMapper.class,   // mapper
  null,             // mapper output key
  null,             // mapper output value
  job);
job.setOutputFormatClass(NullOutputFormat.class);&lt;/PRE&gt;</description>
    <pubDate>Mon, 01 Feb 2016 21:58:43 GMT</pubDate>
    <dc:creator>aervits</dc:creator>
    <dc:date>2016-02-01T21:58:43Z</dc:date>
    <item>
      <title>HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120106#M82880</link>
      <description>&lt;P&gt;Here is my code for the driver for mapreduce :&lt;/P&gt;&lt;PRE&gt;public int run(String[] args) throws Exception {
// TODO Auto-generated method stub
if (args.length!=1){
System.out.println("usage: [input]");
System.exit(-1);
}
Job job = Job.getInstance(getConf());
job.setJarByClass(HBaseDriver.class);
FileInputFormat.addInputPath(job
, new Path(args[0]));
job.getConfiguration().set(TableOutputFormat.OUTPUT_TABLE, "students");
job.setInputFormatClass(StudentInputFormat.class);
job.setMapperClass(HBaseStudentsMapper.class);
job.setOutputFormatClass(TableOutputFormat.class);
job.setNumReduceTasks(0);
returnjob.waitForCompletion(true)? 0 :1;
}
&lt;/PRE&gt;&lt;P&gt;Looks like the system fails on this line :&lt;/P&gt;&lt;P&gt;job.setOutputFormatClass(TableOutputFormat.&lt;STRONG&gt;class&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;the message is: &lt;/P&gt;&lt;P&gt;Exception in thread "main" java.lang.NoClassDefFoundError: &lt;/P&gt;&lt;P&gt;Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/protobuf/generated/MasterProtos$MasterService$BlockingInterface&lt;/P&gt;&lt;P&gt;The interesting thing is that if I comment this line and do some Hbase stuff in the mapper it works. &lt;/P&gt;&lt;P&gt;More over I have he hbase-protocol library and I supply it with my libjars command  &lt;/P&gt;&lt;P&gt;here is how I run the map reduce:&lt;/P&gt;&lt;PRE&gt;hadoop jar mo.jar HBaseDriver -libjars hbase-client.jar,hbase-common.jar,hbase-protocol.jar,htrace-core-2.00.jar,hbase-server.jar input&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Feb 2016 21:51:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120106#M82880</guid>
      <dc:creator>az1</dc:creator>
      <dc:date>2016-02-01T21:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120107#M82881</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1262/az.html" nodeid="1262"&gt;@Avraha Zilberman&lt;/A&gt; have you looked at &lt;A href="http://hbase.apache.org/0.94/book/mapreduce.example.html"&gt;these&lt;/A&gt; examples? Can you show your pom file as well? You'd ususally call a built-in utility for HBase like so&lt;/P&gt;&lt;PRE&gt;TableMapReduceUtil.initTableMapperJob(
  tableName,        // input HBase table name
  scan,             // Scan instance to control CF and attribute selection
  MyMapper.class,   // mapper
  null,             // mapper output key
  null,             // mapper output value
  job);
job.setOutputFormatClass(NullOutputFormat.class);&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Feb 2016 21:58:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120107#M82881</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-01T21:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120108#M82882</link>
      <description>&lt;P&gt;OK, I tried the examples and I get the same exception &lt;/P&gt;&lt;P&gt;I think it means that the problem is with the deployment..&lt;/P&gt;&lt;P&gt;I don't have a pom I just create a jar and put it with relevant jars and then run it with hadoop jar&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 22:25:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120108#M82882</guid>
      <dc:creator>az1</dc:creator>
      <dc:date>2016-02-01T22:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120109#M82883</link>
      <description>&lt;P&gt;It is almost the same exception from the same package:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/protobuf/generated/ClientProtos&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 22:27:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120109#M82883</guid>
      <dc:creator>az1</dc:creator>
      <dc:date>2016-02-01T22:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120110#M82884</link>
      <description>&lt;P&gt;please add hbase-client and hadoop-client to your pom.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 22:29:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120110#M82884</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-01T22:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120111#M82885</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1262/az.html" nodeid="1262"&gt;@Avraha Zilberman&lt;/A&gt; execute the job only specifying hbase-client and hadoop-client, if still doesn't work add hbase-server but that's it.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 22:31:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120111#M82885</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-01T22:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120112#M82886</link>
      <description>&lt;P&gt;Do you mean these files?  &lt;/P&gt;&lt;P&gt;hbase-client.jar&lt;/P&gt;&lt;P&gt;hadoop-mapreduce-client-core.jar&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 22:36:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120112#M82886</guid>
      <dc:creator>az1</dc:creator>
      <dc:date>2016-02-01T22:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120113#M82887</link>
      <description>&lt;P&gt;hbase-client and hadoop-client. If you're running version 2.7.1 of Hadoop and HBase 1.1.2 there are two distinct versions of both jars available. &lt;A rel="user" href="https://community.cloudera.com/users/1262/az.html" nodeid="1262"&gt;@Avraha Zilberman&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 22:43:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120113#M82887</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-01T22:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120114#M82888</link>
      <description>&lt;P&gt;Check out this URL&lt;/P&gt;&lt;P&gt;&lt;A href="https://hbase.apache.org/book.html#hbase.mapreduce.classpath" target="_blank"&gt;https://hbase.apache.org/book.html#hbase.mapreduce.classpath&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You need to add certain jars to HADOOP_CLASSPATH when you launch your map reduce job using either hadoop or yarn command.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 02:47:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120114#M82888</guid>
      <dc:creator>sea_breeze_929</dc:creator>
      <dc:date>2016-02-02T02:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120115#M82889</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I managed to solve it &lt;/P&gt;&lt;P&gt;There are 2 things need to be done for this to work: &lt;/P&gt;&lt;P&gt;First add few jars in the libjars and second add hbase lib to hadoop class path and then it should work.&lt;/P&gt;&lt;P&gt;Here are the libjars needed &lt;/P&gt;&lt;P&gt;hbase-client.jar,hbase-server.jar,hbase-protocol.jar,hbase-common.jar,htrace-core-2.00.jar&lt;/P&gt;&lt;P&gt;pay attention to htrace-core-2.00.jar which is Cloudera jar and I am using hortonworks sandbox 2.2.4.2-2&lt;/P&gt;&lt;P&gt;and need to add the hbase lib to hadoop-env.sh otherwise you wont be able to run the main thread &lt;/P&gt;&lt;P&gt;Thank you for your help hope it helps!!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 16:34:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120115#M82889</guid>
      <dc:creator>az1</dc:creator>
      <dc:date>2016-02-02T16:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: HBase MapReduce job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120116#M82890</link>
      <description>&lt;P&gt;Actually if you are using HDP the jar you would use is &lt;/P&gt;&lt;P&gt;htrace-core-3.1.0-incubating.jar found in /usr/hdp/current/hbase-master/lib instead of htrace-core-2.0.0.jar&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 17:06:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HBase-MapReduce-job/m-p/120116#M82890</guid>
      <dc:creator>amcbarnett</dc:creator>
      <dc:date>2016-02-02T17:06:04Z</dc:date>
    </item>
  </channel>
</rss>

