Sorted results from hbase scanner

后端 未结 1 1220
独厮守ぢ
独厮守ぢ 2021-01-21 02:42

How to retrieve hbase column family \"values\" in any sorted order of the same?

like
column family      value
--------------------

相关标签:
1条回答
  • 2021-01-21 03:02

    HBase 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].

    1. http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Result.html#raw()
    2. http://download.oracle.com/javase/6/docs/api/java/util/Collections.html#sort(java.util.List, java.util.Comparator)
    0 讨论(0)
提交回复
热议问题