繁体   English   中英

如何使用python thrift客户端使用maxversions扫描hbase表?

[英]How to use python thrift client to scan hbase table with maxversions?

所有

我现在正尝试使用python thrift客户端扫描hbase表。 我想要的是获取所有版本的扫描行。 但是,在读取HBase.py文件(可以称为API规范文件)之后,我找不到合适的扫描仪API来这样做。
我发现的全部是:

def scannerOpenWithScan(self, tableName, scan, attributes)
def scannerOpen(self, tableName, startRow, columns, attributes)
def scannerOpenWithStop(self, tableName, startRow, stopRow, columns, attributes)
def scannerOpenWithPrefix(self, tableName, startAndPrefix, columns, attributes)
def scannerOpenTs(self, tableName, startRow, columns, timestamp, attributes)
def scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp, attributes)
def scannerOpenWithTimeRange(self, tableName, startRow, stopRow, columns, startTime, endTime)

上面提到的所有API均不包含与版本相关的任何参数。 也许“属性”可以做一些事情,但是我不知道如何使用它。
对我有什么建议吗?

不幸的是,Thrift API不支持扫描程序为同一行返回多个版本。 您只能获取指定单元格的多个值。

顺便说一句,您应该真正使用HappyBase而不是直接使用Thrift。 HappyBase使使用Python的HBase变得容易得多。

Github也可以使用Happybase。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM