Phoenix 连接hbase 异常:Caused by: java.lang.ClassNotFoundException: org.iq80.snappy.CorruptionException

在Phoenix连接HBase时,抛出异常日志:


先是提示:

 Call exception, tries=10, retries=35, started=68424 ms ago, cancelled=false, msg=row '' on table 'USER' at region=USER,,1437633105692.58399d4c187368bb295098db261227b1., hostname=hadoop-slave03,16020,1438942727857, seqNum=211 
2015-08-12 11:53:32,753 INFO: Call exception, tries=11, retries=35, started=88447 ms ago, cancelled=false, msg=row '' on table 'USER' at region=USER,,1437633105692.58399d4c187368bb295098db261227b1., hostname=hadoop-slave03,16020,1438942727857, seqNum=211 
2015-08-12 11:53:52,883 INFO: Call exception, tries=12, retries=35, started=108577 ms ago, cancelled=false, msg=row '' on table 'USER' at region=USER,,1437633105692.58399d4c187368bb295098db261227b1., hostname=hadoop-slave03,16020,1438942727857, seqNum=211 
2015-08-12 11:54:12,925 INFO: Call exception, tries=13, retries=35, started=128619 ms ago, cancelled=false, msg=row '' 
on table 'USER' at region=USER,,1437633105692.58399d4c187368bb295098db261227b1., hostname=hadoop-slave03,16020,1438942727857, seqNum=211 

最终会抛出异常:

Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(java.io.IOException): java.io.IOException: java.lang.NoClassDefFoundError: org/iq80/snappy/CorruptionException
at org.apache.phoenix.coprocessor.ServerCachingEndpointImpl.addServerCache(ServerCachingEndpointImpl.java:78)
at org.apache.phoenix.coprocessor.generated.ServerCachingProtos$ServerCachingService.callMethod(ServerCachingProtos.java:3200)
at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:6154)
at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1692)
at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1674)
at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31447)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
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.NoClassDefFoundError: org/iq80/snappy/CorruptionException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.apache.phoenix.coprocessor.ServerCachingEndpointImpl.addServerCache(ServerCachingEndpointImpl.java:72)
... 10 more
Caused by: java.lang.ClassNotFoundException: org.iq80.snappy.CorruptionException


解决办法:

在HBase  $HBase_Home/lib下加入phoenix-4.4.0-HBase-1.0-server.jar


参考:https://issues.apache.org/jira/browse/PHOENIX-1468

你可能感兴趣的:(HBase,Phoenix)