apache phoenix DoNotRetryIOException

时间:2016-03-01 06:30:33

标签: phoenix

当我运行sql来创建表时,如下所示:

    CREATE TABLE FM_DAY(
        APPID VARCHAR NOT NULL,
        CREATETIME VARCHAR NOT NULL,
        PLATFORM VARCHAR NOT NULL,
        USERCOUNT UNSIGNED_LONG,
        LONGCOUNT UNSIGNED_LONG,
        USERCOUNT UNSIGNED_LONG,
        CONSTRAINT PK PRIMARY KEY (APPID,CREATETIME,PLATFORM)
    )

此sql错误重复密钥 USERCOUNT ,并且在运行时出错。但是,虽然它会抛出异常,但是创建了这个表,并且该表与使用此sql创建的完全相同:

    CREATE TABLE FM_DAY(
        APPID VARCHAR NOT NULL,
        CREATETIME VARCHAR NOT NULL,
        PLATFORM VARCHAR NOT NULL,
        USERCOUNT UNSIGNED_LONG,
        LONGCOUNT UNSIGNED_LONG,
        CONSTRAINT PK PRIMARY KEY (APPID,CREATETIME,PLATFORM)
    )

不幸的是,在删除删除表选择表时抛出了以下异常,我无法删除此表。

    Error: org.apache.hadoop.hbase.DoNotRetryIOException: FM_DAY: 34
        at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
        at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropTable(MetaDataEndpointImpl.java:1316)
        at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:10525)
        at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:7435)
        at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1875)
        at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1857)
        at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32209)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2114)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:101)
        at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 34
        at org.apache.phoenix.schema.PTableImpl.init(PTableImpl.java:354)
        at org.apache.phoenix.schema.PTableImpl.<init>(PTableImpl.java:276)
        at org.apache.phoenix.schema.PTableImpl.makePTable(PTableImpl.java:265)
        at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:826)
        at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.buildTable(MetaDataEndpointImpl.java:462)
        at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.doDropTable(MetaDataEndpointImpl.java:1336)
        at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropTable(MetaDataEndpointImpl.java:1289)
        ... 10 more

如果有人知道这种情况?我该如何删除此表。 感谢。

1 个答案:

答案 0 :(得分:0)

我想我之前遇到过这个问题。首先,备份您的数据库(如果我的指示不起作用:)

第二

hbase shell

然后使用hbase命令禁用然后删除表。

disable ...

drop ...

执行此操作后,尽管HBase中不存在表格,但该表仍可能显示在Phoenix中。这是因为Phoenix在HBase表中缓存元数据。所以现在你必须找到Phoenix元数据表并删除它(它将在你下次启动Phoenix时重新生成)。

https://mail-archives.apache.org/mod_mbox/phoenix-user/201403.mbox/%3CCAAF1JditzYY6370DVwajYj9qCHAFXbkorWyJhXVprrDW2vYYBA@mail.gmail.com%3E