- Hadoop (0.20.2)
- HBase 0.90.0
Installation
Cluster Setup
Pre-requires
必須先安裝好Hadoop,且Hadoop已經能正確執行
已經將使用NFS同步到所有機器
Configuration
#conf/hbase-env.sh
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export CLASSPATH=/home/hadoop/Hadoop/hadoop/conf
export HBASE_LOG_DIR=/home/hadoop/logs/hbase0902
export HBASE_MANAGES_ZK=true
#conf/hbase-site.xml
<property>
<name>hbase.master</name>
<value>eslab-eth1:60000</value>
</property>
<property>
<name>hbase.master.port</name>
<value>60000</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://eslab-eth1:9000/hbase</value>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>/home/hadoop/data/hbase0902/hbase-${user.name}</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2222</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hadoop/data/hbase0902/hbase-zookeeper</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>eslab-eth1,eslab102,eslab103,eslab104,eslab105,eslab106,eslab107</value>
</property>
</configuration>
eslab-eth1
eslab102
eslab103
eslab104
eslab105
eslab106
eslab107
core-site.xml
mapred-site.xml
移除 lib/hadoop-xxxx.jar
複製hadoop/hadoop-0.20.2-core.jar 到 hbase/lib/hadoop-0.20.2-core.jar
Start Hbase
#./bin/start-hbase.sh
檢查其他主機是否有正常啟動
正常啟動後的Master
[18:10][hadoop@eslab]-(~/Hadoop/hbase)
$ jps
8070 Jps
31895 HRegionServer
12275 JobTracker
12182 SecondaryNameNode
11937 NameNode
31762 HMaster
31697 HQuorumPeer
12392 TaskTracker
12065 DataNode
正常啟動後的slave
[18:00][hadoop@eslab107]-(~)
$ jps
30609 DataNode
30673 TaskTracker
9212 HRegionServer
9143 HQuorumPeer
12252 Jps
Stop HBase
# ./bin/stop-hbase.sh
Shell Mode
# ./bin/hbase shell
留言列表