我正在尝试与hortonworks DP中的HBase节俭服务器连接。
我正在将HDP 3.0与Apache HBase 2.0.0一起使用
我使用Kerberos安全性启动了HBase thrift服务器
kinit -kt /etc/security/keytabs/hbase.service.keytab hbase/node1.domain.com@domain.com && /usr/hdp/current/hbase-master/bin/hbase-daemon.sh start thrift -p 12345
起初,我在节俭时收到“ No protocol version header”错误。我想这是协议兼容性错误,所以我尝试了几件事
-然后我尝试启动服务“ thirft2”而不是“ thrift”,因为我发现它们是不同的:
kinit -kt /etc/security/keytabs/hbase.service.keytab hbase/node1.domain.com@domain.com && /usr/hdp/current/hbase-master/bin/hbase-daemon.sh start thrift2 -p 12345
但是有同样的错误。
我的代码类似于以下代码段:
import os
import easybase
os.system("kinit -kt /app/hbase.service.keytab hbase/node1.domain.com@domain.com")
connection = easybase.Connection(host="node1", port= 12345)
table = connection.table("users")
for key, data in table.scan(row_prefix="username"):
print(key)
与happybase而不是easybase相同的错误
谢谢