tsocket读取0字节-happybase版本0.8

vfwfrxfs  于 2021-06-09  发布在  Hbase
关注(0)|答案(1)|浏览(373)

我正在尝试通过happybase框架版本0.8连接hbase。
我开始节俭了- /usr/hdp/current/hbase-master/bin/hbase-daemon.sh start thrift -p 9090 ```
from happybase.connection import Connection
DEFAULT_HOST = '10.128.121.13'
DEFAULT_PORT = 9090
DEFAULT_TRANSPORT = 'framed'
DEFAULT_COMPAT = '0.96'`

cc = Connection(DEFAULT_HOST,DEFAULT_PORT,None,True,None,'_',DEFAULT_COMPAT,DEFAULT_TRANSPORT) print(cc.tables())`

我是否需要在所有节点、hbase主服务器和RegionServer中启动thrift服务?
我有个错误:
tsocket读取0字节
emeijp43

emeijp431#

如果是分布式集群,则不必单独运行每个节点的thrift服务器。
这似乎是连接示例化的问题。尝试以下操作: conn = happybase.Connection( host='DEFAULT_HOST', port='DEFAULT_PORT', protocol='compact' ) 您还可以查看本期:https://github.com/wbolster/happybase/issues/193

相关问题