Reputation: 320
all
I'm now trying to use python thrift client to scan the hbase table. What I want is getting all versions of the scanned rows. But after reading the HBase.py file (which can be described as the API spec file), I cannot find a suitable scanner API to do so.
All I found were:
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)
All APIs mentioned above do not contain any params that related to the versions.
Maybe the 'attributes' could do something, but I don't know how to use it.
Have you any suggestions for me?
Upvotes: 4
Views: 1915
Reputation: 4037
Unfortunately the Thrift API doesn't support scanners returning multiple versions for the same row. You can only get multiple values for a specified cell.
Btw, you should really use HappyBase instead of using Thrift directly. HappyBase makes using HBase from Python a lot easier.
Happybase is also available at Github.
Upvotes: 2