TSocket读取0字节-happybase版本0.8 [英] TSocket read 0 bytes - happybase version 0.8

查看:213
本文介绍了TSocket读取0字节-happybase版本0.8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过happybase Framework版本0.8连接hbase.

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

我已经开始守护进程- /usr/hdp/current/hbase-master/bin/hbase-daemon.sh start thrift -p 9090

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())`

我是否需要在所有节点(Hbase主服务器和RegionServers)中启动Thrift服务?

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

我收到此错误:

TSocket读取0个字节

TSocket read 0 bytes

推荐答案

如果它是分布式集群,则不必分别运行每个节点的thrift服务器.

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

似乎与Connection的实例化有关.尝试以下操作:

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

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

您也可以查看此问题: https://github.com/wbolster/happybase/issues/193

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

这篇关于TSocket读取0字节-happybase版本0.8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆