使用filter需要guava jar包
The Guava project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth.
否则出错:java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
scan时候出现
java.lang.RuntimeException: org.apache.hadoop.hbase.regionserver.LeaseException: org.apache.hadoop.hbase.regionserver.LeaseException: lease '464943507681458694' does not exist
对应我的使用场景,只需要制定的row,取column page即可,因此使用Get 对象而不是Scan对象,添加一个过滤条件而不是组合row和columnPage作为过滤列表。
hbase数据的排序方式:
HBase Table as Data Structures
• A table maps rows to its families
– SortedMap(Row List(ColumnFamilies))
• A family maps column names to versioned values
– SortedMap(Column SortedMap(VersionedValues))
• A column maps timestamps to values
– SortedMap(Timestamp Value)
An HBase table is a three-dimensional sorted map
(row, column, and timestamp)
row,columnFamily 和 column都是正序排,version按时间倒序排
目前没有发现方法可以获取column的倒序(大->小),且使用不使用filter消耗时间都差不多,感觉时间消耗都在把冷数据调入内存而不是单独取出对应范围的column