2

我想在 Cloudera CDH 5.2 上的 HBase 之上设置 Apache Phoenix。

我下载了Phoenix的最新版本(4.2.2)并将服务器jar文件放到每个区域服务器上的一个目录中(我没有修改master)。

然后我将hbase-env.sh文件更改为指向带有HBASE_CLASSPATH_PREFIX变量的文件。

当我运行以下命令时:

hbase classpath

phoenix serer-jar 报告在列表中。

主机上,当我尝试使用时,出现./sqlline.py quorumserver以下异常:

java.sql.SQLException: ERROR 2006 (INT08): Incompatible jars detected between client and server. Ensure that phoenix.jar is put on the classpath of HBase in every region server: org.apache.hadoop.hbase.exceptions.UnknownProtocolException: No registered coprocessor service found for name MetaDataService in region SYSTEM.CATALOG,,1421861120199.56856673d5cff02b55b9ff5955485dba.
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:5579)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.execServiceOnRegion(HRegionServer.java:3416)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.execService(HRegionServer.java:3398)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:29591)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:108)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:114)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:94)
    at java.lang.Thread.run(Thread.java:745)

    at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:337)
    at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:133)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.checkClientServerCompatibility(ConnectionQueryServicesImpl.java:919)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:817)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1126)
    at org.apache.phoenix.query.DelegateConnectionQueryServices.createTable(DelegateConnectionQueryServices.java:110)
    at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1590)
    at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:568)
    at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:175)
    at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:271)
    at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:263)
    at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:261)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1043)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1551)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1520)
    at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1520)
    at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:162)
    at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:126)
    at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:133)
    at sqlline.SqlLine$DatabaseConnection.connect(SqlLine.java:4650)
    at sqlline.SqlLine$DatabaseConnection.getConnection(SqlLine.java:4701)
    at sqlline.SqlLine$Commands.connect(SqlLine.java:3942)
    at sqlline.SqlLine$Commands.connect(SqlLine.java:3851)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
    at sqlline.SqlLine.dispatch(SqlLine.java:817)
    at sqlline.SqlLine.initArgs(SqlLine.java:633)
    at sqlline.SqlLine.begin(SqlLine.java:680)
    at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
    at sqlline.SqlLine.main(SqlLine.java:424)
Caused by: org.apache.hadoop.hbase.exceptions.UnknownProtocolException: org.apache.hadoop.hbase.exceptions.UnknownProtocolException: No registered coprocessor service found for name MetaDataService in region SYSTEM.CATALOG,,1421861120199.56856673d5cff02b55b9ff5955485dba.
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:5579)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.execServiceOnRegion(HRegionServer.java:3416)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.execService(HRegionServer.java:3398)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:29591)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:108)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:114)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:94)
    at java.lang.Thread.run(Thread.java:745)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:106)
    at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:95)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.getRemoteException(ProtobufUtil.java:285)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.execService(ProtobufUtil.java:1567)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:93)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:90)
    at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:114)
    at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:90)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel.callExecService(RegionCoprocessorRpcChannel.java:96)
    at org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel.callMethod(CoprocessorRpcChannel.java:51)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService$Stub.getVersion(MetaDataProtos.java:7996)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$3.call(ConnectionQueryServicesImpl.java:894)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$3.call(ConnectionQueryServicesImpl.java:886)
    at org.apache.hadoop.hbase.client.HTable$16.call(HTable.java:1542)
    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)
Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.exceptions.UnknownProtocolException): org.apache.hadoop.hbase.exceptions.UnknownProtocolException: No registered coprocessor service found for name MetaDataService in region SYSTEM.CATALOG,,1421861120199.56856673d5cff02b55b9ff5955485dba.
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:5579)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.execServiceOnRegion(HRegionServer.java:3416)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.execService(HRegionServer.java:3398)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:29591)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:108)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:114)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:94)
    at java.lang.Thread.run(Thread.java:745)

    at org.apache.hadoop.hbase.ipc.RpcClient.call(RpcClient.java:1452)
    at org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1656)
    at org.apache.hadoop.hbase.ipc.RpcClient$BlockingRpcChannelImplementation.callBlockingMethod(RpcClient.java:1714)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$BlockingStub.execService(ClientProtos.java:29924)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.execService(ProtobufUtil.java:1563)
    ... 14 more

为了使其正常工作,我还需要进行哪些更改?

4

2 回答 2

2

您可以通过此链接尝试解决类似问题的解决方案,也许其中一些会有所帮助:

1) https://groups.google.com/forum/#!msg/phoenix-hbase-user/f-81YhjfaJI/WHY8IQWJYC0J

根本原因是因为phoenix jar缺少权限。

2) https://www.mail-archive.com/user@phoenix.apache.org/msg00068.html

感谢大家,

我通过更改导入的 jar 名称解决了这个问题。

3) https://issues.apache.org/jira/browse/PHOENIX-1148

意外丢失 RegionServer 后,我收到了同样的错误。即使在重新启动 HBase Master 后,SYSTEM.CATALOG 表也没有传输到另一个 RegionServer。我通过对工作节点运行 hbck 解决了这个问题。例如:sudo -u hbase hbase hbck -fix

于 2015-02-01T19:06:01.767 回答
0

确保你没有犯愚蠢的错误。

像我的情况一样,我把 jar 放在下面lib/hbase而不是应该lib/hbase/lib放在 CDH 集群下。

说真的,我正计划升级我的集群。

于 2015-11-25T09:14:48.130 回答