【问题标题】:TSocket read 0 bytes - happybase version 0.8TSocket 读取 0 字节 - happybase 版本 0.8
【发布时间】:2019-04-23 03:25:54
【问题描述】:

我正在尝试通过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 master 和 RegionServers 中启动 thrift 服务?

我收到了这个错误:

TSocket 读取 0 个字节

【问题讨论】:

    标签: python hbase thrift happybase


    【解决方案1】:

    如果是分布式集群,则不必单独运行每个节点的thrift server。

    连接的实例化似乎有问题。尝试以下:

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

    你也可以看看这个问题:https://github.com/wbolster/happybase/issues/193

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-08
      • 2017-01-15
      • 1970-01-01
      • 2014-04-10
      • 2019-07-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多