立即注册 登录
About云-梭伦科技 返回首页

s060403072的个人空间 https://www.aboutyun.com/?57 [收藏] [复制] [分享] [RSS]

日志

ERROR: org.apache.hadoop.hbase.PleaseHoldException:Master is initializing

已有 1383 次阅读2015-3-26 14:55

今天想操作HBase的CRUD,启动HBase没有问题,但是使用hbase shell 命令转换到shell下时,使用比如命令,scan 't1', create 'test','col' 等等都会出错,下面的是log里面的error部分:

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'}


2014-01-14 02:19:52,285 ERROR org.apache.hadoop.hbase.master.HMasterCommandLine: Failed to start master
java.lang.RuntimeException: HMaster Aborted
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:160)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:104)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2044)
Thu Jan 16 01:27:28 PST 2014 Stopping hbase (via master)
Thu Jan 16 01:34:58 PST 2014 Starting master on hadoop1


虽然看到了log文档里面的提示,但是由于是刚开始接触HBase,所以还是不知道如何下手。还是上网找各种资源,后面看到一个人的博客中提到这个问题按照他们的方法解决了,要注意

/etc/hosts里面的127.0.0.1是否是127.0.1.1,如果是的话,把他改过来就可以了。

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

虽然网上大家的版本各种各样,但是如果真的要学的话,还是官网上面的资料齐全点。



http://www.myexception.cn/internet/1440933.html

原因及解决方法:
查看/etc/hosts文件中的127.0.0.1是不是写成了127.0.1.1啦,更改之后重启Hbase和Hadoop即可!

路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 立即注册

关闭

推荐上一条 /2 下一条