Hbase installation in three node hadoop cluster -
i have installed hadoop 3 node cluster(master,slave1 , slave2). install hbase distrubuted mode. think install hbase master , zookeepr in hadoop cluster master machine(i.e namenode), , region servers in slave1 , slave2(i.e datanodes) machines. correct approach ?
sorry, may simple question new nosql systems , want installations.
i appreciate if able share reference document ths installation.
thanks in advance.
in order configure hbase , zookeeper on 3 nodes, i.e., 1 master
, 2 slave
nodes, need edit hbase-site.xml, regionservers, hbase-env.sh
(found in $hbase_home/conf
) , zoo.cfg
(found in $zookeeper_home/conf
).
let name master node master
, slave nodes slave1
, slave2
. let consider hadoop, hbase , zoopeeper folders in /usr/local/cluster/
folder. change 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 localhost , add these lines if want regionservers in slave1
, slave2
only)
slave1
slave2
4. zoo.cfg:
--modify these lines--
datadir=/usr/local/cluster/zk-tmp
--add these lines(since start zookeeper server on master node)--
server.0=master:2888:3888
5. etc/hosts:
edit /etc/hosts
file , comment line 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: steps 1 5 in master, slave1 , 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 hbase , zookeeper processes: results jps
command in each node should contain-
--master--
quorumpeermain
hmaster
hregionserver
--slave1--
hregionserver
--slave2--
hregionserver
9. stopping zookeeeper , hbase:
$zookeeper_home/bin/zkserver.sh start
$hbase_home/bin/stop-hbase.sh
Comments
Post a Comment