I am trying to create a table in hbase shell using the command
hbaseshell> create 'person', 'info'
The command does not executes successfully and throws an error as below:
ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
at org.apache.hadoop.hbase.master.HMaster.checkInitialized(HMaster.java:2829)
at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:2085)
at org.apache.hadoop.hbase.master.MasterRpcServices.createTable(MasterRpcServices.java:706)
at org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:392)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:133)
at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:356)
at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:336)
For usage try 'help "create"'
I searched online and found some answers. But the answers are not very clear. It just states to clear off -Wipe the Zookeeper data directory- .
But where is the data directory ? and how can I access it. Can someone please guide the steps needed?
mac@AS-MAC-0061 3.7.0_1 % jps
8417 DataNode
8851 NodeManager
9411 Launcher
1204
8311 NameNode
14873 HMaster
8554 SecondaryNameNode
14682 QuorumPeerMain
8748 ResourceManager
15262 Jps
Attaching reference of answer I found but could not follow the directions.
org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
wiping out the Zookeeper data directory
CodePudding user response:
I resolved the error by deleting the directory : version-2 from the path /opt/homebrew/var/zookeeper/zookeeper_0.
The path can be found in the value of property : hbase.zookeeper.property.dataDir mentioned in the hbase-site.xml
Works fine now !