平台:window+linux
工具:IDEA2016
public class HbaseTest {
public static void main(String[] args) throws Exception {
// createTab();
// HTable table = getTable();
// System.out.println(table.getName());
// putData();
getData();
}
//添加文本过滤器
public static void testFilter() {
HTable table = null;
try {
table = getTable();
Scan scan = new Scan();
// create filter
Filter filter = null;
filter = new PrefixFilter(Bytes.toBytes("rk"));
filter = new PageFilter(3);
// create hbase comparator
ByteArrayComparable comp = null;
comp = new SubstringComparator("lisi");
filter = new SingleColumnValueFilter(
Bytes.toBytes("info"),
Bytes.toByt