سؤال

The HBase table key is designed as Prefix (4bytes) |Timestamp long value (8bytes) |severial bytes (lenght is different).

Now I want to scan the table using start key and end key. prefix is fixed for a scan, start key and end key is due to timestamp. Like scan keys between Data1|2013-05-01 10:10|* and Data1|2013-06-01 10:10|*

How can I build the start key and end key for this? It confused me that the key lenght is not fix. And the start end key is not that obvious like fix length key.

هل كانت مفيدة؟

المحلول

You can use a range where the second key prefix (Data1|2013-06-01 10:10|) is appended by a value that is larger than anything that can follow (say two bytes of 0xFF)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top