Hbase shell 中能否通过filter实现的高级查询

import org.apache.hadoop.hbase.filter.CompareFilter
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter
import org.apache.hadoop.hbase.filter.SubstringComparator
import org.apache.hadoop.hbase.util.Bytes
scan 't1', { COLUMNS => 'family:qualifier', FILTER =>
    SingleColumnValueFilter.new
        (Bytes.toBytes('列族'),
         Bytes.toBytes('列名'),
         CompareFilter::CompareOp.valueOf('EQUAL'),
         Bytes.toBytes("值"))
}

posted on 2015-11-24 11:28  1130136248  阅读(523)  评论(0编辑  收藏  举报

导航