1、安装完hbase之后,进入shell报错
2、看不出什么问题,java的报错给的信息太少,只能看log日志了
日志中一直不断的出现等待region server,感觉好像是hmaster和regionserver无法连接
3、查看hbase-site.xml的配置信息
把上面这部分信息去掉
4、重启hbase
5、再次进入shell中创建表
- hbase(main):002:0> create 'test', 'cf1'
-
- ERROR: org.apache.hadoop.hbase.PleaseHoldException: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
-
- Here is some help for this command:
- Create table; pass table name, a dictionary of specifications per
- column family, and optionally a dictionary of table configuration.
- Dictionaries are described below in the GENERAL NOTES section.
- Examples:
-
- hbase> create 't1', {NAME => 'f1', VERSIONS => 5}
- hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
- hbase> # The above in shorthand would be the following:
- hbase> create 't1', 'f1', 'f2', 'f3'
- hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
- hbase> create 't1', 'f1', {SPLITS => ['10', '20', '30', '40']}
- hbase> create 't1', 'f1', {SPLITS_FILE => 'splits.txt'}
- hbase> # Optionally pre-split the table into NUMREGIONS, using
- hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
- hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}
- 2015-09-08 13:06:48,198 INFO org.apache.hadoop.hbase.procedure.ZKProcedureUtil: Clearing all procedure znodes: /hbase/online-snapshot/acquired /hbase/online-snapshot/reached /hbase/online-snapshot/abort
- 2015-09-08 13:06:48,200 DEBUG org.apache.hadoop.hbase.procedure.ZKProcedureCoordinatorRpcs: Starting the controller for procedure member:master1,60000,1441717604714
- 2015-09-08 13:06:48,205 DEBUG org.apache.hadoop.hbase.executor.ExecutorService: Starting executor service name=MASTER_OPEN_REGION-master1,60000,1441717604714, corePoolSize=5, maxPoolSize=5
- 2015-09-08 13:06:48,205 DEBUG org.apache.hadoop.hbase.executor.ExecutorService: Starting executor service name=MASTER_CLOSE_REGION-master1,60000,1441717604714, corePoolSize=5, maxPoolSize=5
- 2015-09-08 13:06:48,205 DEBUG org.apache.hadoop.hbase.executor.ExecutorService: Starting executor service name=MASTER_SERVER_OPERATIONS-master1,60000,1441717604714, corePoolSize=3, maxPoolSize=3
- 2015-09-08 13:06:48,206 DEBUG org.apache.hadoop.hbase.executor.ExecutorService: Starting executor service name=MASTER_META_SERVER_OPERATIONS-master1,60000,1441717604714, corePoolSize=5, maxPoolSize=5
- 2015-09-08 13:06:48,206 DEBUG org.apache.hadoop.hbase.executor.ExecutorService: Starting executor service name=MASTER_TABLE_OPERATIONS-master1,60000,1441717604714, corePoolSize=1, maxPoolSize=1
- 2015-09-08 13:06:48,208 DEBUG org.apache.hadoop.hbase.master.cleaner.CleanerChore: initialize cleaner=org.apache.hadoop.hbase.master.cleaner.TimeToLiveLogCleaner
- 2015-09-08 13:06:48,212 DEBUG org.apache.hadoop.hbase.master.cleaner.CleanerChore: initialize cleaner=org.apache.hadoop.hbase.master.cleaner.TimeToLiveHFileCleaner
- 2015-09-08 13:06:48,212 DEBUG org.apache.hadoop.hbase.master.HMaster: Started service threads
- 2015-09-08 13:06:48,212 INFO org.apache.hadoop.hbase.master.ServerManager: Waiting for region servers count to settle; currently checked in 0, slept for 0 ms, expecting minimum of 1, maximum of 2147483647, timeout of 4500 ms, interval of 1500 ms.
- 2015-09-08 13:06:49,721 INFO org.apache.hadoop.hbase.master.ServerManager: Waiting for region servers count to settle; currently checked in 0, slept for 1508 ms, expecting minimum of 1, maximum of 2147483647, timeout of 4500 ms, interval of 1500 ms.
- ...................................................
- ...................................................
- ...................................................
- 2015-09-08 13:07:08,021 INFO org.apache.hadoop.hbase.master.ServerManager: Waiting for region servers count to settle; currently checked in 0, slept for 19809 ms, expecting minimum of 1, maximum of 2147483647, timeout of 4500 ms, interval of 1500 ms.
3、查看hbase-site.xml的配置信息
- <property>
- <name>hbase.cluster.distributed</name>
- <value>true</value>
- </property>
4、重启hbase
5、再次进入shell中创建表
- grid@master1:/usr/local/hbase/conf$ start-hbase.sh
- starting master, logging to /usr/local/hbase/logs/hbase-grid-master-master1.out
- slave3: starting regionserver, logging to /usr/local/hbase/bin/../logs/hbase-grid-regionserver-slave3.out
- slave2: starting regionserver, logging to /usr/local/hbase/bin/../logs/hbase-grid-regionserver-slave2.out
- slave1: starting regionserver, logging to /usr/local/hbase/bin/../logs/hbase-grid-regionserver-slave1.out
- grid@master1:/usr/local/hbase/conf$ hbase shell
- HBase Shell; enter 'help<RETURN>' for list of supported commands.
- Type "exit<RETURN>" to leave the HBase Shell
- Version 0.94.27, rfb434617716493eac82b55180b0bbd653beb90bf, Thu Mar 19 06:17:55 UTC 2015
-
- hbase(main):001:0> create 'test', 'cf1'
- 0 row(s) in 2.0140 seconds
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12219480/viewspace-1794790/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12219480/viewspace-1794790/