HBase Forum

MapReduce job over HBase fails

  • #15814


    I am running MapReduce job over HBase-0.94.3 and Hadoop-1.0.3 cluster of 3 machines but it gives me error as Null pointer exception. Caused by ReverseDNS.

    When I tried to run MapReduce job over Hadoop it gets executed perfectly.

    How to resolve it?

    Thanks in advance.

to create new topics or reply. | New User Registration

  • Author
  • #16019

    Hi Bhusahn,

    Could you post the relevant parts of the logs where the error shows?


    Yi Zhang

    Hi Bhusahn,

    Do you have reverse DNS set up for HBase? In earlier versions of HBase, both for forward and reverse DNS resolving must work. I am not sure about the version 0.94.3.

    Happy Hadoop,


    I am using Hadoop-1.0.3 and HBase-0.94.3. I am able to run MapReduce job over Hadoop-1.0.3. But I got following error while running MapReduce job over HBase-0.94.3.
    Exception in thread “main” java.lang.NullPointerException
    at org.apache.hadoop.net.DNS.reverseDns(DNS.java:72)
    at org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.reverseDNS(TableInputFormatBase.java:218)
    at org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.getSplits(TableInputFormatBase.java:183)
    at org.apache.hadoop.mapred.JobClient.writeNewSplits(JobClient.java:962)
    at org.apache.hadoop.mapred.JobClient.writeSplits(JobClient.java:979)
    at org.apache.hadoop.mapred.JobClient.access$600(JobClient.java:174)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:897)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:416)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
    at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:500)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530)
    at org.apache.hadoop.hbase.mapreduce.CopyTable.main(CopyTable.java:237)

    Is MapReduce job runs over HBase-0.94.3 and Hadoop-1.0.3?

    ( Ref : HBASE-7693 )


    Is it isue of version of HBase?

    If its issue of forward and ReverseDNS, how to set it?

    Larry Liu

    Do you use DNS or /etc/hosts?
    If you use dns server, please set up reverse DNS for each node.

    Here is a guide how to set up DNS record in BIND. I assume you use BIND on linux




    Thanks Larry.

    How to use only /etc/hosts instaed of DND? Is their any MapReduce programs which says about using only one of them?


    Hi Bushan,

    Actually both files are used, DNS is usually controlled by a server on a different box than yours, and the /etc/hosts file is, of course the file on your machine. Entries in the /etc/hosts file will take precedence over those on the DNS server, though this can be changed. So if you make your entry there it should work.


You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.