hbase shell中執行list命令報錯:ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing


問題描述:

  今天在測試環境中,搭建hbase環境,執行list命令之后,報錯:

hbase(main):001:0> list
TABLE                                                                                                                                                                                          

ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
	at org.apache.hadoop.hbase.master.HMaster.checkInitialized(HMaster.java:2642)
	at org.apache.hadoop.hbase.master.MasterRpcServices.getTableNames(MasterRpcServices.java:941)
	at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java:63368)
	at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2354)
	at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124)
	at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:297)
	at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:277)

Here is some help for this command:
List all user tables in hbase. Optional regular expression parameter could
be used to filter the output. Examples:

  hbase> list
  hbase> list 'abc.*'
  hbase> list 'ns:abc.*'
  hbase> list 'ns:.*'

問題解決:

1.在網上找了一下,說的是,底層的使用的是本地的文件系統,沒有使用hdfs

2.將base-site.xml文件中的hbase.rootdir進行修改,改為以下的內容:

  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://redhat6:9000/hbase</value>
  </property>

備注:將hbase.rootdir改為hdfs的目錄,不是使用本地的目錄

3.修改之后,重啟hbase,在此執行list,問題解決.

 

文檔創建時間:2018年5月4日10:45:49


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM