Split View: HBase 3.0 Install on Ubuntu(Non Secure)
HBase 3.0 Install on Ubuntu(Non Secure)
Overview
HBase 빌드방법에 이어서, Cluster 모드 설치 방법에 대해 공유하겠습니다.
Zookeeper
Zookeeper Binary Download
zookeeper 공식 download 페이지 에서 원하는 version의 zookeeper를 찾는다.
wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.0/apache-zookeeper-3.8.0-bin.tar.gz
tar -zxvf apache-zookeeper-3.8.0-bin.tar.gz
sudo cp -r apache-zookeeper-3.8.0-bin /usr/local/zookeeper
Zookeeper conf
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/var/zookeeper
clientPort=2181
server.1=ubuntu01:2888:3888
server.2=ubuntu02:2888:3888
server.3=ubuntu03:2888:3888
myid file 생성
/var/zookeeper 폴더 하위에 myid라는 파일을 생성하고, 여기에 zookeeper 서버의 고유한 숫자를 적어준다. 1번노드에는 1, 2번 노드에는 2, 3번 노드에는 3을 적어주는 것이 일반적이다.
mkdir /var/zookeeper
vim /var/zookeeper/myid
HBase
HBase binary install
hbase download versions 에서 원하는 binary version을 찾는다.
wget https://www.apache.org/dyn/closer.lua/hbase/3.0.0-alpha-3/hbase-3.0.0-alpha-3-bin.tar.gz
tar -zxvf hbase-3.0.0-alpha-3-bin.tar.gz
sudo cp -r hbase-3.0.0-alpha-3 /usr/local/hbase
HBase configuration
<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://ubuntu01:9000/hbase</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>ubuntu01,ubuntu02,ubuntu03</value>
</property>
<property>
<name>hbase.wal.provider</name>
<value>filesystem</value>
</property>
</configuration>
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HBASE_CLASSPATH=${HADOOP_CONF_DIR}
export HBASE_MANAGES_ZK=false
ubuntu02
ubuntu03
ubuntu04
ubuntu05
ubuntu06
zookeeper 구동
ubuntu01, ubuntu02, ubuntu03 에서 아래 명령어를 통해 zookeeper 서버를 구동한다.
zookeeper/bin/zkServer.sh start
HBase구동
아래 명령어를 실행하면, master node인 ubuntu01에는 HMaster가 실행되고, 나머지 노드들인 ubuntu0[2:6]에는 regionserver가 실행된다.
start-hbase.sh
jps 명령어를 입력해보면 아래와 master 노드에는 아래와 같이 표시된다. zookeeper process는 QuorumPeerMain으로 표시된다.
1693816 ResourceManager
1702488 SecondaryNameNode
1787785 Jps
1771793 QuorumPeerMain
1781957 HMaster
1701958 NameNode
worker node에서 jps입력시 아래처럼 표시된다.
1785194 HRegionServer
1703882 DataNode
1786480 Jps
1704373 NodeManager
HBase Web UI 확인
http://ubuntu01:16010 에 접속하면 HMaster의 상태와 region-server의 상태를 확인할 수 있다.
HBase 3.0 Install on Ubuntu (Non Secure)
Overview
Following the HBase build instructions, I will share the cluster mode installation method.
Zookeeper
Zookeeper Binary Download
Find the desired version of Zookeeper from the official Zookeeper download page.
wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.0/apache-zookeeper-3.8.0-bin.tar.gz
tar -zxvf apache-zookeeper-3.8.0-bin.tar.gz
sudo cp -r apache-zookeeper-3.8.0-bin /usr/local/zookeeper
Zookeeper conf
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/var/zookeeper
clientPort=2181
server.1=ubuntu01:2888:3888
server.2=ubuntu02:2888:3888
server.3=ubuntu03:2888:3888
Creating the myid file
Create a file named myid under the /var/zookeeper directory, and write a unique number for each Zookeeper server. Typically, you write 1 for node 1, 2 for node 2, and 3 for node 3.
mkdir /var/zookeeper
vim /var/zookeeper/myid
HBase
HBase binary install
Find the desired binary version from hbase download versions.
wget https://www.apache.org/dyn/closer.lua/hbase/3.0.0-alpha-3/hbase-3.0.0-alpha-3-bin.tar.gz
tar -zxvf hbase-3.0.0-alpha-3-bin.tar.gz
sudo cp -r hbase-3.0.0-alpha-3 /usr/local/hbase
HBase configuration
<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://ubuntu01:9000/hbase</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>ubuntu01,ubuntu02,ubuntu03</value>
</property>
<property>
<name>hbase.wal.provider</name>
<value>filesystem</value>
</property>
</configuration>
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HBASE_CLASSPATH=${HADOOP_CONF_DIR}
export HBASE_MANAGES_ZK=false
ubuntu02
ubuntu03
ubuntu04
ubuntu05
ubuntu06
Starting Zookeeper
Start the Zookeeper server on ubuntu01, ubuntu02, and ubuntu03 using the following command.
zookeeper/bin/zkServer.sh start
Starting HBase
When you run the following command, HMaster will start on the master node ubuntu01, and regionservers will start on the remaining nodes ubuntu02 through ubuntu06.
start-hbase.sh
When you enter the jps command, the master node will display something like the following. The Zookeeper process is displayed as QuorumPeerMain.
1693816 ResourceManager
1702488 SecondaryNameNode
1787785 Jps
1771793 QuorumPeerMain
1781957 HMaster
1701958 NameNode
When you enter jps on a worker node, it displays the following.
1785194 HRegionServer
1703882 DataNode
1786480 Jps
1704373 NodeManager
HBase Web UI Verification
You can check the status of HMaster and region servers by accessing http://ubuntu01:16010.