HBASE 创建表出错:ERROR: java.io.IOException: Table Namespace Manager not ready yet, try again later

当需要创建表的时候出现如下报错:

hbase(main):002:0> create 'test', {NAME=>'f1'}

ERROR: java.io.IOException: Table Namespace Manager not ready yet, try again later
    at org.apache.hadoop.hbase.master.HMaster.getNamespaceDescriptor(HMaster.java:3172)
    at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1727)
    at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1766)
    at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java:40470)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2027)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:108)
    at org.apache.hadoop.hbase.ipc.FifoRpcScheduler$1.run(FifoRpcScheduler.java:74)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Here is some help for this command:
Creates a table. Pass a table name, and a set of column family
specifications (at least one), and, optionally, table configuration.
Column specification can be a simple string (name), or a dictionary
(dictionaries are described below in main help output), necessarily 
including NAME attribute. 
Examples:
序号出错原因解决方案
1没有关闭安全模式在hadoop目录输入bin/hadoop dfsadmin -safemode leave
2把单机配置到多机当不使用hbase自带的zookeeper时,需要修改conf/hbase-env.sh 注释掉export HBASE_MANAGES_ZK=true 。重新启动hbase就可以了
3没有时间同步使用ntp工具同步, 1:crontab -e 输入0 1 * * * /usr/sbin/ntpdate master,2: 手动同步终端输入:ntpdate us.pool.ntp.org
4zookeeper引起的,通常这种情况往往是在你正在运行一个进程正在操作hbase数据库的时候,hbase进程被杀掉或hbase服务被停掉所引起的可以将hbase的zookeeper目录下的文件全都删除掉,然后再重启hbase服务就可以了
5数据损坏导致当前数据存放的regin无法使用此时使用hadoop fsck 进行分析 就能看到CORRUPT 的storefile路径 hadoop fs -rm 当前storefile

后面两条是网上找的,以后会用到的。

相关文章

发表评论

您的电子邮箱地址不会被公开。