1、修改hbase-env.sh
1 2 3 4 5 |
# Tell HBase whether it should manage it's own instance of ZooKeeper or not. export HBASE_MANAGES_ZK=false # The java implementation to use. Java 1.8+ required. export JAVA_HOME=/usr/lib/java |
2、修改hbase-site.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>hbase.rootdir</name> <value>file:///root/hbase-uat/data</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>127.0.0.1</value> </property> <property> <name>hbase.zookeeper.property.clientPort</name> <value>12181</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/root/hbase-uat/zookeeper</value> </property> <property> <name>zookeeper.znode.parent</name> <value>/hbase-uat</value> </property> </configuration> |
3、修改regionservers
一行一个,将regoin服务器添加上。
4、Master startup cannot progress, in holding-pattern until region onlined
如果日志中出现下面的错误:
1 |
Master startup cannot progress, in holding-pattern until region onlined |
则执行zkCli.sh删除meta信息即可:
1 2 |
zkCli.sh -server 127.0.0.1 deleteall /hbase-uat |
转载时请保留出处,违法转载追究到底:进城务工人员小梅 » HBase使用独立部署ZooKeeper的伪单机模式