Prakrati,

   Assuming you're using HBase version 0.90.3:

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.hbase/hbase/0.90.3/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java

It would appear that your job variable is null.  For future reference,
it helps a lot if you can provide the version of HBase you're using.

   ~ Minh

On Tue, Jun 26, 2012 at 3:29 AM, Prakrati Agrawal
<[email protected]> wrote:
> Dear all
>
> I created a database in HBase. First I was retrieving it using Java APIs but 
> it was taking a lot of time(43 seconds) to retrieve it. I thought of writing 
> Map Reduce code to retrieve it to make it faster. But I am getting Null 
> Pointer Exception in my code. Following is the excerpt from my code:
>
> TableMapReduceUtil.initTableMapperJob(
>                                                  tableName,        // input 
> HBase table name
>                                                  scanRows,             // 
> Scan instance to control CF and attribute selection
>                                                  MyMapper.class,   // mapper
>                                                  null,             // mapper 
> output key
>                                                  null,             // mapper 
> output value
>                                                  job);
> job.setOutputFormatClass(NullOutputFormat.class);   // because we aren't 
> emitting anything from mapper
>
> boolean b = job.waitForCompletion(true);
> if (!b) {
>              throw new IOException("error with job!");
> }
>
>
> The error I get is as follows:
> Exception in thread "main" java.lang.NullPointerException
>            at 
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:100)
>            at 
> org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.initTableMapperJob(TableMapReduceUtil.java:75)
>
> Please help me
>
>
> Thanks and Regards
> Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 | www.mu-sigma.com
>
>
> ________________________________
> This email message may contain proprietary, private and confidential 
> information. The information transmitted is intended only for the person(s) 
> or entities to which it is addressed. Any review, retransmission, 
> dissemination or other use of, or taking of any action in reliance upon, this 
> information by persons or entities other than the intended recipient is 
> prohibited and may be illegal. If you received this in error, please contact 
> the sender and delete the message from your system.
>
> Mu Sigma takes all reasonable steps to ensure that its electronic 
> communications are free from viruses. However, given Internet accessibility, 
> the Company cannot accept liability for any virus introduced by this e-mail 
> or any attachment and you are advised to use up-to-date virus checking 
> software.

Reply via email to