我正在尝试导入happybase,但在连接时收到以下错误消息。我已经运行了hadoop伪节点集群和hbase。安装的组件版本如下:hadoop版本-1.0.4 hbase版本-0.94.4 happybase版本-0.4
有人可以看看下面的例外情况,让我知道,如果任何节俭的具体设置或任何指导,在得到这个固定。
谢谢您。
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import happybase
connection = happybase.Connection('localhost')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/happybase/api.py", line 121, in __init__
self.open()
File "/Library/Python/2.6/site-packages/happybase/api.py", line 138, in open
self.transport.open()
File "/Library/Python/2.6/site-packages/thrift/transport/TTransport.py", line 149, in open
return self.__trans.open()
File "/Library/Python/2.6/site-packages/thrift/transport/TSocket.py", line 99, in open
message=message)
thrift.transport.TTransport.TTransportException: Could not connect to localhost:9090
4条答案
按热度按时间3okqufwl1#
在尝试连接之前,请确保已启动thrift服务器。
hgb9j2n62#
这对我有用:
a64a0gku3#
plicqrtu4#
trift服务器必须启动并运行。您的连接也必须打开:
使用前在python中打开连接:
例子: