HBase テーブル (私は HappyBase を使用しています) から行をフィルタリングしようとしています。具体的には、「id」が 1000 未満の行を取得しようとしています:
for key, data in graph_table.scan(filter="SingleColumnValueFilter('cf', 'id', <, 'binary:1000')"):
print key, data
結果は次のとおりです。
<http://ieee.rkbexplorer.com/id/publication-d2a6837e67d808b41ffe6092db50f7cc> {'cf:type': 'v', 'cf:id': '100', 'cf:label': '<http://www.aktors.org/ontology/portal#Proceedings-Paper-Reference>'}
<http://www.aktors.org/ontology/date#1976> {'cf:type': 'v', 'cf:id': '1', 'cf:label': '<http://www.aktors.org/ontology/support#Calendar-Date>'}
<http://www.aktors.org/ontology/date#1985> {'cf:type': 'v', 'cf:id': '10', 'cf:label': '<http://www.aktors.org/ontology/support#Calendar-Date>'}
テーブルには、1 から 1000 までの「id」を持つ行があります。HBase Java ライブラリを使用してこれを Java でコーディングすると、整数値を Byte.toBytes() 関数で解析して正常に動作します。
ありがとうございました。