4. Validate the Installation

Use these steps to validate your installation.

  1. Start HBase and ZooKeeper.

    1. Execute this command from the each ZooKeeper node:

      <login as $ZOOKEEPER_USER>
      /usr/lib/zookeeper/bin/zkServer.sh start $ZOOKEEPER_CONF_DIR/zoo.cfg
    2. Execute this command from the HBase Master node:

      <login as $HBASE_USER>
      /usr/lib/hadoop/bin/hadoop fs -mkdir /apps/hbase
      /usr/lib/hadoop/bin/hadoop fs -chown -R hbase /apps/hbase
      /usr/lib/hbase/bin/hbase-daemon.sh --config $HBASE_CONF_DIR start master
    3. Execute this command from each HBase Region Server node:

      <login as $HBASE_USER>
      /usr/lib/hbase/bin/hbase-daemon.sh --config $HBASE_CONF_DIR start regionserver
      

      where:

      • $HBASE_CONF_DIR is the directory to store the HBase configuration files. For example, /etc/hbase/conf.

      • $HBASE_USER is the user owning the HBase services. For example, hbase.

      • $ZOOKEEPER_CONF_DIR is the directory to store the ZooKeeper configuration files. For example, /etc/zookeeper/conf.

      • $ZOOKEEPER_USER is the user owning the ZooKeeper services. For example, zookeeper.

  2. Smoke Test HBase and ZooKeeper.

    From a terminal window, enter:

    echo "echo status | hbase shell" > /tmp/hbasesmoke.sh
    echo "echo disable 'usertable' | hbase shell" >> /tmp/hbases­moke.sh
    echo "echo drop 'usertable' | hbase shell" >> /tmp/hbasesmoke.sh
    echo "echo create 'usertable', 'family' | hbase shell" >> /tmp/hbasesmoke.sh
    echo "echo put 'usertable', 'row01', 'family:col01', 'value1' | hbase shell" >> /tmp/hbasesmoke.sh
    echo "echo scan 'usertable' | hbase shell" >> /tmp/hbasesmoke.sh
    sh /tmp/hbasesmoke.sh


loading table of contents...