HBase中既不启用也不禁用表 [英] Table is neither enables nor disabled in HBase

查看:623
本文介绍了HBase中既不启用也不禁用表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正面临一个奇怪的问题。我通过API访问我的HBase表。在执行期间中途我得到了RegionNotServing我的表'x'。但我的HRegionServers工作正常。

当我尝试列出来自HBase Shell的表时,我无法找到我的表'x'。当我试图禁用我的表'x'时,它抛出了一个TableNotEnabledException,当我试图启用我的表'x'时,它给我一个TableNotDisabledException。



附加的是执行我得到了:

  hbase(main):002:0>禁用'x'

错误:org.apache.hadoop.hbase.master中org.apache.hadoop.hbase.TableNotEnabledException:org.apache.hadoop.hbase.TableNotEnabledException:x
。 handler.disableTableHandler。< init>(DisableTableHandler.java:75)
at org.apache.hadoop.hbase.master.HMaster.disableTable(HMaster.java:1154)
at sun.reflect.NativeMethodAccessorImpl .invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java .lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine $ Server.call(WritableRpcEngine.java:364)
at org.apache .hadoop.hbase.ipc.HBaseServer $ Handler.run(HBaseServer.java:1336)

下面是这个命令的一些帮助:
开始禁用命名表:eg hbase>禁用't1'


hbase(main):003:0>启用'x'

错误:org.apache.hadoop.hbase.TableNotDisabledException:org.apache.hadoop.hbase.TableNotDisabledException:x
at org.apache.hadoop.hbase.master。 < init>(EnableTableHandler.java:74)
at org.apache.hadoop.hbase.master.HMaster.enableTable(HMaster.java:1142)
at sun.reflect.NativeMethodAccessorImpl .invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java .lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine $ Server.call(WritableRpcEngine.java:364)
at org.apache .hadoop.hbase.ipc.HBaseServer $ Handler.run(HBaseServer.java:1336)

下面是对这个命令的一些帮助:
启动启用命名表:eg hbase>启用't1'


hbase(main):004:0>


解决方案

之前我有类似的问题。问题是因为Zookeeper拿着桌子。
所以我按照以下步骤手动删除了表:
$ b


  1. 使用进入hbase zookeper客户端模式, hbase zkcli 命令

  2. 使用命令 delete / hbase / table / x


I am facing a weird problem. I was accessing my HBase tables through an API. Midway during execution I got a RegionNotServing for my table 'x'. But My HRegionServers were working fine.

When I tried to list the tables from HBase Shell I could not find my table 'x'. When I tried to Disable my table 'x' it threw a TableNotEnabledException and when I tried to Enable my table 'x' it threw me a TableNotDisabledException.

Attached is the Exeption I got:

hbase(main):002:0> disable 'x'

ERROR: org.apache.hadoop.hbase.TableNotEnabledException: org.apache.hadoop.hbase.TableNotEnabledException: x
        at org.apache.hadoop.hbase.master.handler.DisableTableHandler.<init>(DisableTableHandler.java:75)
        at org.apache.hadoop.hbase.master.HMaster.disableTable(HMaster.java:1154)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:364)
        at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1336)

Here is some help for this command:
Start disable of named table: e.g. "hbase> disable 't1'"


hbase(main):003:0> enable 'x'

ERROR: org.apache.hadoop.hbase.TableNotDisabledException: org.apache.hadoop.hbase.TableNotDisabledException: x
        at org.apache.hadoop.hbase.master.handler.EnableTableHandler.<init>(EnableTableHandler.java:74)
        at org.apache.hadoop.hbase.master.HMaster.enableTable(HMaster.java:1142)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:364)
        at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1336)

Here is some help for this command:
Start enable of named table: e.g. "hbase> enable 't1'"


hbase(main):004:0> 

解决方案

I had a similar issue before. The problem was because Zookeeper was holding the table. So I deleted the table manually by following the below steps

  1. Enter into hbase zookeper client mode using hbase zkcli command
  2. Delete the table using the command delete /hbase/table/x

这篇关于HBase中既不启用也不禁用表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆