3. Set Up the Configuration Files

There are several configuration files that need to be set up for HBase and ZooKeeper.

 3.1. Extract the HBase/ZooKeeper Configuration Files

From the file you downloaded in Download Companion Files, extract the files in configuration_files/hbase and configuration_files/ zookeeper directories to two temporary directories.

 3.2. Modify the Configuration Files

In the respective temporary directories, locate the following files and modify the properties based on your environment. Search for TODO in the files for the properties to replace.

 

Table 9.1. zoo.cfg

VariableExampleDescription

server.1

$zookeeper.server1.full.hostname:2888:3888

Enter the 1st ZooKeeper hostname

server.2

$zookeeper.server2.full.hostname:2888:3888

Enter the 2nd ZooKeeper hostname

server.3

$zookeeper.server3.full.hostname:2888:3888

Enter the 3rd ZooKeeper hostname


 

Table 9.2. hbase-site.xml

VariableExampleDescription

hbase.rootdir

hdfs://$namenode.full.hostname:8020/apps/hbase/data

Enter the NameNode server FQDN.

hbase.master.info.bindAddress

$hbase.master.full.hostname

Enter the HBase Master server FQDN

hbase.zookeeper.quorum

server1.full.hostname,server2.full.hostname, server3.full.hostname

Comma separated list of Zookeeper servers (match to what is specified in zoo.cfg but without portnumbers)


 3.3. Copy the Configuration Files

  1. Replace the installed ZooKeeper configs with the modified ZooKeeper configuration files and set appropriate permissions.

    rm -rf $ZOOKEEPER_CONF_DIR/* 

    <Copy all the config files to $ZOOKEEPER_CONF_DIR>

    chown -R $ZOOKEEPER_USER:$HADOOP_GROUP $ZOOKEEPER_CONF_DIR/../  
    chmod -R 755 $ZOOKEEPER_CONF_DIR/../
  2. Replace the installed HBase configs with the modified HBase configuration files and set appropriate permissions.

    rm -rf $HBASE_CONF_DIR

    <Copy all the config files to $HBASE_CONF_DIR >

    chown -R $HBASE_USER:$HADOOP_GROUP $HBASE_CONF_DIR/../  ;
    chmod -R 755 $HBASE_CONF_DIR/../

loading table of contents...