apache phoenix无法连接到hbase

pprl5pva  于 2021-06-10  发布在  Hbase
关注(0)|答案(2)|浏览(554)

我是Phoenix城的新用户,可能错过了一些简单的东西。
hbase启动
21:44:23/浇口$ps-ef | grep hmaster
501 55936 55922 0 9:50pm ttys014 0:18.12/library/java/javavirtualmachines/jdk1.8.0\u 71.jdk/contents/home/bin/java-dproc\u master-xx:onautofmemoryerror=kill-9%p-djava.net.preferipv4stack=true--dhbase.security.logger=info,rfas org.apache.hadoop.hbase.master.hmaster开始
我们可以通过 hbase shell 和查询资料:
hbase(主):010:0>扫描“t1”
行列+单元格r1列=f1:c1,时间戳=1469077174795,值=val1 0.0370秒内1行
现在我复制了Phoenix 4.4.6 jar到$hbase\u home/lib目录,重新启动hbase并尝试通过 sqlline.py :

$sqlline.py mellyrn.local:2181

Setting property: [incremental, false]
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:mellyrn.local:2181 none none org.apache.phoenix.jdbc.PhoenixDriver
Connecting to jdbc:phoenix:mellyrn.local:2181
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/shared/phoenix-4.7.0-HBase-1.1-bin/phoenix-4.7.0-HBase-1.1-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hadoop/2.6.0/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
16/07/20 22:03:03 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Error: org.apache.hadoop.hbase.DoNotRetryIOException: Class org.apache.phoenix.coprocessor.MetaDataEndpointImpl cannot be loaded Set hbase.table.sanity.checks to false at conf or table descriptor if you want to bypass sanity checks
    at org.apache.hadoop.hbase.master.HMaster.warnOrThrowExceptionForFailure(HMaster.java:1603)
    at org.apache.hadoop.hbase.master.HMaster.sanityCheckTableDescriptor(HMaster.java:1535)
    at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1452)
    at org.apache.hadoop.hbase.master.MasterRpcServices.createTable(MasterRpcServices.java:429)
    at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java:52195)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2127)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
    at java.lang.Thread.run(Thread.java:745) (state=08000,code=101)
org.apache.phoenix.except

..

Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: 
org.apache.hadoop.hbase.DoNotRetryIOException: Class 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl cannot be loaded Set 
hbase.table.sanity.checks to false at conf or table descriptor if you want to 
bypass sanity checks

有什么需要提出来的吗 phoenix 会有帮助的。

2w3kk1z5

2w3kk1z51#

上面的异常是当hbase master无法加载phoenixserver.jar时引发的,尽管phoenixserver.jar的安装说明说只重新启动区域服务器是不够的,将phoenixserver.jar复制到与区域服务器相同的hbase master和备份master中,然后重新启动所有这些服务器。

vxqlmq5t

vxqlmq5t2#

检查 $HBASE_HOME/lib 以及 $HBASE_HOME/conf/hbase-site.xmlHMaster .
启动phoenix时,它将创建4个系统表:

SYSTEM.CATALOG
SYSTEM.FUNCTION
SYSTEM.SEQUENCE
SYSTEM.STATS

SYSTEM.CATALOG 以及 SYSTEM.FUNCTION 声明使用协处理器 org.apache.phoenix.coprocessor.MetaDataEndpointImpl ,但您的主机似乎无法加载它。

相关问题