Reputation: 1
I have installed my hadoop three node cluster(master,slave1 and slave2). I would like to install Hbase fully distrubuted mode. I am think to install HBase Master and Zookeepr in my hadoop cluster MASTER machine(i.e Namenode), And Region Servers in SLAVE1 and SLAVE2(i.e Datanodes) machines. Is this correct approach ?
Sorry, This may be simple question but I am new to NoSQL systems and want to do this installations.
I really appreciate If someone able to share any reference document for ths installation.
Thanks in advance.
Upvotes: 0
Views: 1312
Reputation: 2574
In order to configure hbase and zookeeper on three nodes, i.e., 1 master
and 2 slave
nodes, you will need to edit hbase-site.xml, regionservers, hbase-env.sh
(found in $HBASE_HOME/conf
) and zoo.cfg
(found in $ZOOKEEPER_HOME/conf
).
Let us name your master node as master
and slave nodes as slave1
and slave2
. Let us consider your hadoop, hbase and zoopeeper folders are in /usr/local/cluster/
folder. Change the following files:
1. hbase-site.xml:
<configuration>
<property>
<name>hbase.master</name>
<value>master:60000</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:8020/hbase</value>
</property>
<property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>slave1,slave2</value>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>/usr/local/cluster/zk-tmp</value>
</property>
</configuration>
2. hbase-env.sh:
--add these lines--
export JAVA_HOME=/usr/lib/jvm/default-java
export HBASE_HOME=/usr/local/cluster/hbase
export HADOOP_HOME=/usr/local/cluster/hadoop
--modify these lines--
export HBASE_PID_DIR=/usr/local/cluster/zk-tmp
export HBASE_MANAGES_ZK=false
3. regionservers:
(delete the localhost and add these lines if you just want your regionservers in slave1
and slave2
only)
slave1
slave2
4. zoo.cfg:
--modify these lines--
dataDir=/usr/local/cluster/zk-tmp
--add these lines(since you start zookeeper server on master node)--
server.0=master:2888:3888
5. etc/hosts:
Edit the /etc/hosts
file and comment the line with 127.0.1.1
(to avoid loopback address problems)
--add these lines--
your-master-node-ip master
your-slave1-node-ip slave1
your-slave2-node-ip slave2
Note: Do steps 1 to 5 in master, slave1 and slave2 nodes.
6. Start zookeeper server in master
node:
$ZOOKEEPER_HOME/bin/zkServer.sh start
7. Start hbase processes in master
node:
$HBASE_HOME/bin/start-hbase.sh
8. Check your hbase and zookeeper processes: Results for jps
command in each node should contain-
--master--
QuorumPeerMain
HMaster
HRegionServer
--slave1--
HRegionServer
--slave2--
HRegionServer
9. Stopping zookeeeper and hbase:
$ZOOKEEPER_HOME/bin/zkServer.sh start
$HBASE_HOME/bin/stop-hbase.sh
Upvotes: 3