Python Thrift和HappyBase不兼容

时间:2018-08-13 07:15:17

标签: python thrift happybase pyhive

我有一个使用Impyla和HappyBase软件包的Web应用程序。

如果我更改代码以使用pyHive而不是impyla,则它会在Thrift模块上失败,提示“无法导入名称TFrozenDict”。

我正在使用Thrift-0.9.3。如果将软件包版本更新为0.11.0,该错误就会消失,但是与我的HBase相关的代码将开始失败,并显示以下错误:

  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/happybase/table.py", line 368, in scan
self.name, scan, {})
  File "/usr/lib/python2.7/dist-packages/happybase/hbase/Hbase.py", line 1888, in scannerOpenWithScan
self.send_scannerOpenWithScan(tableName, scan, attributes)
  File "/usr/lib/python2.7/dist-packages/happybase/hbase/Hbase.py", line 1897, in send_scannerOpenWithScan
args.write(self._oprot)
  File "/usr/lib/python2.7/dist-packages/happybase/hbase/Hbase.py", line 8435, in write
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
TypeError: expecting list of size 2 for struct args

我检查了此链接(https://github.com/wbolster/happybase/issues/154),但不知道让我的应用程序与PyHive和HappyBase一起工作很热。

谢谢

0 个答案:

没有答案