happybase hbase table.put命令错误?

bxgwgixi  于 2021-06-08  发布在  Hbase
关注(0)|答案(0)|浏览(265)

我正在尝试从python代码连接到hbase-1.2.6,如下所示:

import happybase
connection = happybase.Connection(host='localhost',port=16010)
table = connection.table('blogpost')
table.put('1', {'post:title': 'hello world1'})

我在hbase中手动创建了表“blogpost”。我正在使用python-2.7和happybase-1.1.0。
错误日志如下:
/usr/bin/python2.7/home/spark/pycharmprojects/pyspark/hbase.py traceback(最后一次调用):

File "/home/spark/PycharmProjects/PySpark/hbase.py", line 5, in <module>
table.put('1', {'post:title': 'hello world1'})

File "/usr/local/lib/python2.7/dist-packages/happybase/table.py", line 464, in put
batch.put(row, data)

File "/usr/local/lib/python2.7/dist-packages/happybase/batch.py", line 137, in __exit__
self.send()

File "/usr/local/lib/python2.7/dist-packages/happybase/batch.py", line 60, in send
self._table.connection.client.mutateRows(self._table.name, bms, {})

File "/usr/local/lib/python2.7/dist-packages/thriftpy/thrift.py", line 198, in _req
return self._recv(_api)

File "/usr/local/lib/python2.7/dist-packages/thriftpy/thrift.py", line 210, in _recv
fname, mtype, rseqid = self._iprot.read_message_begin()

文件“thriftpy/protocol/cybin/cybin.pyx”,第439行,在cybin.tcybinaryprotocol.read\u message\u begin(thriftpy/protocol/cybin/cybin.c:6470)cybin.protocolerror:无协议版本头
谢谢。进程已完成,退出代码为1

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题