为什么Impala没有在hbase表上工作?

时间:2015-07-20 08:49:04

标签: hadoop hive hbase cloudera impala

我使用hive创建hbase表A的外部表B.我可以成功访问B.的数据。然后我按照官方指南输入Imapla Shell:

invalidate metadata B;

然后我在Impala Shell中查询这个外部表B:

select * from B limit 4;

但输出:

ERROR: RuntimeException: couldn't retrieve HBase table (mv_p2pusers) info:
Enable/Disable failed

以下是一些相关的日志:

11:13:58.937 AM INFO    jni-util.cc:177 
java.lang.RuntimeException: couldn't retrieve HBase table (mv_p2pusers) info:
Enable/Disable failed
    at com.cloudera.impala.planner.HBaseScanNode.computeScanRangeLocations(HBaseScanNode.java:300)
    at com.cloudera.impala.planner.HBaseScanNode.init(HBaseScanNode.java:125)
    at com.cloudera.impala.planner.SingleNodePlanner.createScanNode(SingleNodePlanner.java:891)
    at com.cloudera.impala.planner.SingleNodePlanner.createTableRefNode(SingleNodePlanner.java:1082)
    at com.cloudera.impala.planner.SingleNodePlanner.createSelectPlan(SingleNodePlanner.java:526)
    at com.cloudera.impala.planner.SingleNodePlanner.createQueryPlan(SingleNodePlanner.java:151)
    at com.cloudera.impala.planner.SingleNodePlanner.createSingleNodePlan(SingleNodePlanner.java:117)
    at com.cloudera.impala.planner.Planner.createPlan(Planner.java:47)
    at com.cloudera.impala.service.Frontend.createExecRequest(Frontend.java:842)
    at com.cloudera.impala.service.JniFrontend.createExecRequest(JniFrontend.java:146)
11:13:58.939 AM INFO    status.cc:114   
RuntimeException: couldn't retrieve HBase table (mv_p2pusers) info:
Enable/Disable failed
    @           0x78b793  (unknown)
    @           0xa68275  (unknown)
    @           0x9802c6  (unknown)
    @           0x99db78  (unknown)
    @           0x99e6e4  (unknown)
    @           0x9d50cb  (unknown)
    @           0xb33687  (unknown)
    @           0xb29054  (unknown)
    @           0x9ac52b  (unknown)
    @          0x1571c39  (unknown)
    @          0x155d9cf  (unknown)
    @          0x155f914  (unknown)
    @           0x92d363  (unknown)
    @           0x92daca  (unknown)
    @           0xaa4faa  (unknown)
    @           0xaa7130  (unknown)
    @           0xca79b3  (unknown)
    @       0x386be079d1  (unknown)
    @       0x386bae8b6d  (unknown)
11:13:58.940 AM INFO    impala-server.cc:824    
UnregisterQuery(): query_id=d4269ff898eb4e7:1866144af0d14a7
11:13:58.940 AM INFO    impala-server.cc:893    
Cancel(): query_id=d4269ff898eb4e7:1866144af0d14a7
11:13:59.935 AM INFO    ClientCnxn.java:975 
Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
11:13:59.935 AM WARN    ClientCnxn.java:1102    
Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
Java exception follows:
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
11:14:01.036 AM INFO    ClientCnxn.java:975 
Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
11:14:01.037 AM WARN    ClientCnxn.java:1102    
Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
Java exception follows:
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
11:14:02.138 AM INFO    ClientCnxn.java:975 
Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
11:14:02.138 AM WARN    ClientCnxn.java:1102    
Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
Java exception follows:
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
11:14:02.199 AM INFO    impala-hs2-server.cc:795    
GetSchemas(): request=TGetSchemasReq {
  01: sessionHandle (struct) = TSessionHandle {
    01: sessionId (struct) = THandleIdentifier {
      01: guid (string) = "\xf8\xb9n\xe4\xb4\xf6N\xef\xad)9W.\x92#Y",
      02: secret (string) = "\xc0?\xc7\xd9\x930C\x9b\xb5\xf6K\x8em\xcb\xf8\xe4",
    },
  },
}
11:14:02.203 AM INFO    MetadataOp.java:414 
Returning 19 schemas

似乎hbase表B既可以启用也可以禁用,非常奇怪。我用google搜索,这是否与hbase安全问题或impala版本问题有关?

有没有人遇到过同样的问题?如何解决这个问题?提前谢谢。

1 个答案:

答案 0 :(得分:1)

从Impala配置启用HBase服务。

你可以从Cloudera经理,Imapala->配置中做到这一点 从" Hbase"中搜索并启用该服务。 PFA。 enter image description here