There are several configuration files that need to be set up for HBase and ZooKeeper.
Extract the HBase and ZooKeeper configuration files.
From the downloaded
scripts.zipfile, extract the files inconfiguration_files/hbaseandconfiguration_files/zookeeperdirectory to separate temporary directories.Modify the configuration files.
In the respective temporary directories, locate the following files and modify the properties based on your environment. Search for
TODOin the files for the properties to replace.Edit the
zoo.cfgand modify theserver.1,server.2, andserver.3properties:#The number of milliseconds of each tick tickTime=2000 #The number of ticks that the initial synchronization phase can take initLimit=10 #The number of ticks that can pass between sending a request and getting an acknowledgement syncLimit=5 #The directory where the snapshot is stored. dataDir=$ZOOKEEPER_DATA_DIR #The port at which the clients will connect clientPort=2181 server.1=$zk.server1.full.hostname:2888:3888 server.2=$zk.server2.full.hostname:2888:3888 server.3=$zk.server3.full.hostname:2888:3888
where,
$ZOOKEEPER_DATA_DIRis the ZooKeeper data directory. For example,/grid1/hadoop/zookeeper/data.Edit the
hbase-site.xmland modify the following properties:<property> <name>hbase.rootdir</name> <value>hdfs://$hbase.namenode.full.hostname:8020/apps/hbase/data</value> <description>Enter the HBase NameNode server hostname</description> </property>
<property> <name>hbase.master.info.bindAddress</name> <value>0.0.0.0</value> <description>The bind address for the HBase Master web UI.</description> </property>
<property> <name>hbase.zookeeper.quorum</name> <value>$zk.server1.full.hostname,$zk.server2.full.hostname,$zk.server3.full.hostname</value> <description>Comma separated list of Zookeeper servers (match to what is specified in zoo.cfg but without portnumbers)</description> </property>
Copy the configuration files
On all hosts create the config directory:
rm -r $HBASE_CONF_DIR ; mkdir -p $HBASE_CONF_DIR ;
rm -r $ZOOKEEPER_CONF_DIR ; mkdir -p $ZOOKEEPER_CONF_DIR ;
Copy all the HBase configuration files to
$HBASE_CONF_DIRand the ZooKeeper configuration files to$ZOOKEEPER_CONF_DIRdirectory.Set appropriate permissions:
chmod a+x $HBASE_CONF_DIR/; chown -R $HBASE_USER:$HADOOP_GROUP $HBASE_CONF_DIR/../ ; chmod -R 755 $HBASE_CONF_DIR/../
chmod a+x $ZOOKEEPER_CONF_DIR/; chown -R $ZOOKEEPER_USER:$HADOOP_GROUP $ZOOKEEPER_CONF_DIR/../ ; chmod -R 755 $ZOOKEEPER_CONF_DIR/../
where:
$HBASE_CONF_DIRis the directory to store the HBase configuration files. For example,/etc/hbase/conf.$HBASE_USERis the user owning the HBase services. For example,hbase.$ZOOKEEPER_CONF_DIRis the directory to store the ZooKeeper configuration files. For example,/etc/zookeeper/conf.$ZOOKEEPER_USERis the user owning the ZooKeeper services. For example,zookeeper.

