* 查询某一张表中的某一列等于某一个值（比如sw-treeId-cid-mapping，sw-traceId-cid-mapping）

```java
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter;
import org.apache.hadoop.hbase.filter.BinaryComparator;
import org.apache.hadoop.hbase.filter.CompareFilter;
import org.apache.hadoop.hbase.filter. Filter;
scan 'sw-chain-info', { FILTER
=>SingleColumnValueFilter.new(Bytes.toBytes('trace_info'),Bytes.toBytes('cid'),
CompareFilter::CompareOp.valueOf('EQUAL'),
BinaryComparator.new(Bytes.toBytes('CID_B4CAEE3953B3C0DBD7A43656B2EEE345')))}
```

* 限制查询某张表的条数
**以下只返回10条记录**
```java
scan "sw-treeId-cid-mapping",{LIMIT =>10}
```

* 根据TreeId查询某个月份合并过的CID
**以下是查询2016年4月份TREE_ID_BF32F7D57F6E69912C8AF2487F1FFCE1合并过的CID**
```java
get "sw-treeId-cid-mapping","TREE_ID_354AF3F3F58CE4AECFCC7782A188396B@2016-3"
```

* 根据CID查询所有归属TraceId
```java
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter;
import org.apache.hadoop.hbase.filter.BinaryComparator;
import org.apache.hadoop.hbase.filter.CompareFilter;
import org.apache.hadoop.hbase.filter. Filter;
scan 'sw-traceId-cid-mapping', { FILTER =>SingleColumnValueFilter.new(Bytes.toBytes('cid'),Bytes.toBytes('cid'), CompareFilter::CompareOp.valueOf('EQUAL'),BinaryComparator.new(Bytes.toBytes('CID_A4AD2F204E3DA016BC455AB95FAEFFF9')))}
```