Sorted results from hbase scanner
How to retrieve hbase column 开发者_运维百科family "values" in any sorted order of the same?
like
column family value --------------------------------- column:1 1 column:3 2 column:4 3 column:2 4HBase itself won't do that, instead you could retrieve the list of KeyValues using the Result.raw[1] method, put that in a List and sort it by passing your own comparator to Collections.sort[2].
- http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Result.html#raw()
- http://download.oracle.com/javase/6/docs/api/java/util/Collections.html#sort(java.util.List, java.util.Comparator)
精彩评论