TSocket read 0 bytes - happybase version 0.8

核能气质少年 提交于 2019-12-12 01:15:30

问题


I'm trying to connect hbase by happybase framework version 0.8.

I've started daemon thrift - /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())`

Do I need to start thrift service in all nodes, Hbase master and RegionServers ?

I got this error:

TSocket read 0 bytes


回答1:


If it is a distributed cluster, you don't have to run thrift server of each node individually.

It seems to be issue with instantiation of Connection. Try following :

conn = happybase.Connection( host='DEFAULT_HOST', port='DEFAULT_PORT', protocol='compact' )

You can also have a look in this issue : https://github.com/wbolster/happybase/issues/193



来源:https://stackoverflow.com/questions/53397166/tsocket-read-0-bytes-happybase-version-0-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!