1. 程式人生 > >ERROR: org.apache.hadoop.hbase.PleaseHoldException:Master is initializing

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

http://blog.csdn.net/wuzhilon88/article/details/18408149

今天想操作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即可!