欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

hbasephoenixprotobuf问题

时间:2023-05-02

安装phoenix后,启动hbase,过一会HRegionServer直接报错停止服务

2022-02-10 15:59:03,452 ERROR [RS_OPEN_PRIORITY_REGION-regionserver/master:16020-0] coprocessor.CoprocessorHost: The coprocessor org.apache.phoenix.coprocessor.ServerCachingEndpointImpl threw java.lang.ClassCastException: org.apache.phoenix.coprocessor.ServerCachingEndpointImpl cannot be cast to com.google.protobuf.Servicejava.lang.ClassCastException: org.apache.phoenix.coprocessor.ServerCachingEndpointImpl cannot be cast to com.google.protobuf.Service at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.createEnvironment(RegionCoprocessorHost.java:412) at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.createEnvironment(RegionCoprocessorHost.java:95) at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.checkAndLoadInstance(CoprocessorHost.java:281) at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.load(CoprocessorHost.java:247) at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.load(CoprocessorHost.java:198) at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.loadTableCoprocessors(RegionCoprocessorHost.java:387) at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.(RegionCoprocessorHost.java:274) at org.apache.hadoop.hbase.regionserver.HRegion.(HRegion.java:870) at org.apache.hadoop.hbase.regionserver.HRegion.(HRegion.java:742) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.hadoop.hbase.regionserver.HRegion.newHRegion(HRegion.java:7796) at org.apache.hadoop.hbase.regionserver.HRegion.openHRegionFromTableDir(HRegion.java:8028) at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:8005) at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:7963) at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:7914) at org.apache.hadoop.hbase.regionserver.handler.AssignRegionHandler.process(AssignRegionHandler.java:145) at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:104) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)2022-02-10 15:59:03,453 INFO [regionserver/master:16020] server.AbstractConnector: Stopped ServerConnector@6a10b263{HTTP/1.1, (http/1.1)}{0.0.0.0:16030}

详细日志如上,找了三天的问题,原因在于拷贝phoenix的jar包到hbase的lib下太多了,目前找到的很多文章都是说三个jar包全部拷贝,但是三个jar包的protobuf不一致,导致protobuf报错,所以正确做法是只拷贝phoenix下的server包就行

我对应版本的完整包名是

phoenix-hbase-2.4.0-5.1.2-bin/phoenix-server-hbase-2.4.0-5.1.2.ja

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。