hbase-0.96.2-hadoop2-bin.tar.gz
tar -zxvf hbase-0.96.2-hadoop2-bin.tar.gz -C app/
//修改jdk 环境变量 vim hbase-env.sh export JAVA_HOME=/home/hadoop/app/jdk1.7.0_65 export HBASE_MANAGES_ZK=false//这个参数默认是 true,意思是使用hbase系统内部自带的zookeeper。
vim hbase-site.xml <configuration> <!-- 指定hbase在HDFS上存储的路径 --> <property> <name>hbase.rootdir</name> <value>hdfs://ns1/hbase</value> </property> <!-- 指定hbase是分布式的 --> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <!-- 指定zk的地址,多个用“,”分割 ,hbase.zookeeper.quorum 的个数必须是奇数,至少是3个--> <property> <name>hbase.zookeeper.quorum</name> <!-- quorum : 法定人数 --> <value>zeek05:2181,zeek06:2181,zeek07:2181</value> </property> </configuration>
vim regionservers zeek03 zeek04 zeek05 zeek06
scp -r hbase-0.96.2-hadoop2/ zeek02:/home/hadoop/app scp -r hbase-0.96.2-hadoop2/ zeek03:/home/hadoop/app scp -r hbase-0.96.2-hadoop2/ zeek04:/home/hadoop/app scp -r hbase-0.96.2-hadoop2/ zeek05:/home/hadoop/app scp -r hbase-0.96.2-hadoop2/ zeek06:/home/hadoop/app
./zkServer.sh start
start-dfs.sh
start-hbase.sh
hbase-daemon.sh start master
------------------------- 结束,学习到上面步骤即可 ----------------------------------------
org.apache.hadoop.hbase.ClockOutOfSyncException: org.apache.hadoop.hbase.ClockOutOfSyncException: Server hadoop02,60020,1374576225508 has been rejected; Reported time is too far out of sync with master. Time difference of 62062623ms > max allowed of 30000ms这是由于master 和 regionserver之间的时间误差太大造成的。
<property> <name>hbase.master.maxclockskew</name> <value>180000</value> <description>Time difference of regionserver from master</description> <property>该参数默认 为 30 000 (30秒)