【问题标题】:Connecting to HBase when just hbase.zookeeper.quorum is given仅给出 hbase.zookeeper.quorum 时连接到 HBase
【发布时间】:2014-12-11 13:44:08
【问题描述】:

hbase-site.xml 给出时

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>a.example.com,b.example.com,c.example.com</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2181</value>
    </property>
</configuration>

如何使用happybase 连接到HBase?

我尝试连接到其中一个

import happybase
conn = happybase.Connection('a.example.com', port=2181)
conn.open()
conn.close()

这显示以下错误:

...
thrift.transport.TTransport.TTransportException: Could not connect to a.example.com:2181

【问题讨论】:

  • Happybase 使用 hadoop thrift API 与 HBase 通信

标签: python hbase apache-zookeeper happybase


【解决方案1】:

我遇到了同样的错误,因为没有运行 Thrift 服务器。通过以下方式修复它:

hbase thrift start -threadpool

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-17
    • 2013-03-11
    • 2015-03-17
    • 2019-02-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多