HBase Java client - unknown host: localhost.localdomain

后端 未结 2 1975
轮回少年
轮回少年 2021-01-16 19:44

Versions: Hadoop: 2.0.0-cdh4.3.1

HBase: 0.94.6-cdh4.3.1

I am running cloudera quick start vm(Everything is running on 172.16.144.150), Here is my little HBas

相关标签:
2条回答
  • 2021-01-16 20:14

    Resloved the problem at the end, I think what happened was:

    1. my Hbase client (remote machine) is looking for zookeeper first. It reads local hbase-site.xml, and finds the zookeeper on the cloudera vm, it then locates Hbase master no problem.

    2. it gets to Hbase master, next step it tries to locate the regions for the specific HBase table I am asking for, in my case, it's 's1'. It finds -ROOT- first:

    locateRegionInMeta parentTable=-ROOT-, metaLocation={region=-ROOT-,,0.70236052, hostname=localhost.localdomain, port=60020} table

    So the problem I guess is that, in hbase, the metadata is pointing to localhost.localdomain which is correct according to the hbase-site.xml on my cloudera vm. But My HBase client remotely, of coz, has no idea what is localhost.localdomain.

    by adding the ip and localhost.localdomain mapping in the /etc/hosts at my client side, it starts working.

    0 讨论(0)
  • 2021-01-16 20:25

    Add the following 2 lines in your client :

    config.set("hbase.zookeeper.quorum", "172.16.144.150");
    config.set("hbase.zookeeper.property.clientPort","2181");
    

    Also add the hostname and IP of the machine into the /etc/hosts file of your client.

    0 讨论(0)
提交回复
热议问题