0
votes

I was following a book Hadoop for Dummies. Book’s instruction to amend the file hbase-site.xml in HBase like this :

    <configuration>
      <property>
        <name>hbase.rootdir</name>
        <value>file:///home/biadmin/my-local-hbase/hbase-data</value>
      </property>
      <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
      </property>
      <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2222</value>
        <description>Property from ZooKeeper's config zoo.cfg.
        The port at which the clients will connect.
        </description>
      </property>
      <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/home/biadmin/my-local-hbase/zookeeper</value>
      </property>
      <property>
        <name>hbase.zookeeper.quorum</name>
        <value>bivm</value>
      </property>
    </configuration>

It says :

Using the hbase.rootdir property, you specify a directory in the local file system to store the HBase data. In production environments, this property would point to the HDFS for the data store. You also set the hbase.cluster.distributed property to true which causes HBase to start up in a pseudodistributed mode. If you would choose not to set this property to true, HBase would run all of the necessary processes in a single Java Virtual Machine (JVM). However, for the sake of illustration, pseudo-distributed mode will cause HBase to start a RegionServer instance, a MasterServer instance, and a Zookeeper process. Additionally, you need to specify the hbase.zookeeper. property.clientPort, the directory where Zookeeper will store its data (hbase.zookeeper.property.dataDir) and a list of servers on which Zookeeper will run to form a quorum (hbase.zookeeper.quorum). For standalone, you specify only the single Zookeeper server bivm.

When I start hbase, I get this error :

Bivm: ssh: Could not resolve hostname bivm.

Could anyone please advise how to solve this problem? Thanks!!!

1

1 Answers

0
votes

HBase depends on a service called Zookeeper to manage its state. By default, HBase manages the Zookeeper service for you (unless you change HBASE_MANAGES_ZK variable), but you need to configure it. One of the options is directly in hbase-site.xml - that's what hbase.zookeeper.* properties are for.

Because Zookeeper may run as a distributed service, hbase.zookeeper.quorum contains a comma-separated list of hosts on where Zookeeper is running. I assume you're running on just a single machine, therefore you should set its value to localhost:

<property>
  <name>hbase.zookeeper.quorum</name>
  <value>localhost</value>
</property>

You have previously set it to bivm, which is a hostname that doesn't exist on your network and you cannot resolve it.

I recommend you to read more about the topic at HBase documentation or at this question.