Operator | Description |
LESS | 小于 |
LESS_OR_EQUAL | 小于等于 |
[EQUAL | 等于 |
NOT_EQUAL | 不等于 |
GREATER_OR_EQUAL | 大于等于 |
GREATER | 大于 |
NO_OP | 排除所有 |
Comparator | Description |
BinaryComparator | 使用Bytes.compareTo()比较 |
BinaryPrefixComparator | 和BinaryComparator差不多,从前面开始比较 |
NullComparator | Does not compare against an actual value but whether a given one is null, or not null. |
BitComparator | Performs a bitwise comparison, providing a BitwiseOp class with OR, and XORoperators. |
RegexStringComparator | 正则表达式 |
SubstringComparator | 把数据当成字符串,用contains()来判断 |
- import java.io.IOException;
- import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.hbase.HBaseConfiguration;
- import org.apache.hadoop.hbase.HColumnDescriptor;
- import org.apache.hadoop.hbase.HTableDescriptor;
- import org.apache.hadoop.hbase.client.HBaseAdmin;
- import org.apache.hadoop.hbase.client.HTable;
- import org.apache.hadoop.hbase.client.Put;
- import org.apache.hadoop.hbase.client.Result;
- import org.apache.hadoop.hbase.client.ResultScanner;
- import org.apache.hadoop.hbase.client.Scan;
- import org.apache.hadoop.hbase.filter.BinaryComparator;
- import org.apache.hadoop.hbase.filter.BinaryPrefixComparator;
- import org.apache.hadoop.hbase.filter.CompareFilter;
- import org.apache.hadoop.hbase.filter.Filter;
- import org.apache.hadoop.hbase.filter.RegexStringComparator;
- import org.apache.hadoop.hbase.filter.RowFilter;
- import org.apache.hadoop.hbase.filter.SubstringComparator;
- public class TestHbaseRowFilter {
- String tableName = "test_row_filter";
- Configuration config = HBaseConfiguration.create();
- /**
- * 部分代码来自hbase权威指南
- * @throws IOException
- */
- public void testRowFilter() throws IOException {
- HTable table = new HTable(config, tableName);
- Scan scan = new Scan();
- System.out.println("小于等于row010的行");
- Filter filter1 = new RowFilter(CompareFilter.CompareOp.LESS_OR_EQUAL,
- new BinaryComparator("row010".getBytes()));
- scan.setFilter(filter1);
- ResultScanner scanner1 = table.getScanner(scan);
- for (Result res : scanner1) {
- System.out.println(res);
- }
- scanner1.close();
- System.out.println("正则获取结尾为5的行");
- Filter filter2 = new RowFilter(CompareFilter.CompareOp.EQUAL,
- new RegexStringComparator(".*5[ DISCUZ_CODE_0 ]quot;));
- scan.setFilter(filter2);
- ResultScanner scanner2 = table.getScanner(scan);
- for (Result res : scanner2) {
- System.out.println(res);
- }
- scanner2.close();
- System.out.println("包含有5的行");
- Filter filter3 = new RowFilter(CompareFilter.CompareOp.EQUAL,
- new SubstringComparator("5"));
- scan.setFilter(filter3);
- ResultScanner scanner3 = table.getScanner(scan);
- for (Result res : scanner3) {
- System.out.println(res);
- }
- scanner3.close();
- System.out.println("开头是row01的");
- Filter filter4 = new RowFilter(CompareFilter.CompareOp.EQUAL,
- new BinaryPrefixComparator("row01".getBytes()));
- scan.setFilter(filter4);
- ResultScanner scanner4 = table.getScanner(scan);
- for (Result res : scanner4) {
- System.out.println(res);
- }
- scanner3.close();
- }
- /**
- * 初始化数据
- */
- public void init() {
- // 创建表和初始化数据
- try {
- HBaseAdmin admin = new HBaseAdmin(config);
- if (!admin.tableExists(tableName)) {
- HTableDescriptor htd = new HTableDescriptor(tableName);
- HColumnDescriptor hcd1 = new HColumnDescriptor("data");
- htd.addFamily(hcd1);
- HColumnDescriptor hcd2 = new HColumnDescriptor("url");
- htd.addFamily(hcd2);
- admin.createTable(htd);
- }
- HTable table = new HTable(config, tableName);
- table.setAutoFlush(false);
- int count = 50;
- for (int i = 1; i <= count; ++i) {
- Put p = new Put(String.format("row%03d", i).getBytes());
- p.add("data".getBytes(), String.format("col%01d", i % 10)
- .getBytes(), String.format("data%03d", i).getBytes());
- p.add("url".getBytes(), String.format("col%01d", i % 10)
- .getBytes(), String.format("url%03d", i).getBytes());
- table.put(p);
- }
- table.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- /**
- * @param args
- * @throws IOException
- */
- public static void main(String[] args) throws IOException {
- TestHbaseRowFilter test = new TestHbaseRowFilter();
- test.init();
- test.testRowFilter();
- }
- }
复制代码
- 小于等于row010的行
- keyvalues={row001/data:col1/1364133382268/Put/vlen=7, row001/url:col1/1364133382268/Put/vlen=6}
- keyvalues={row002/data:col2/1364133382268/Put/vlen=7, row002/url:col2/1364133382268/Put/vlen=6}
- keyvalues={row003/data:col3/1364133382268/Put/vlen=7, row003/url:col3/1364133382268/Put/vlen=6}
- keyvalues={row004/data:col4/1364133382268/Put/vlen=7, row004/url:col4/1364133382268/Put/vlen=6}
- keyvalues={row005/data:col5/1364133382268/Put/vlen=7, row005/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row006/data:col6/1364133382268/Put/vlen=7, row006/url:col6/1364133382268/Put/vlen=6}
- keyvalues={row007/data:col7/1364133382268/Put/vlen=7, row007/url:col7/1364133382268/Put/vlen=6}
- keyvalues={row008/data:col8/1364133382268/Put/vlen=7, row008/url:col8/1364133382268/Put/vlen=6}
- keyvalues={row009/data:col9/1364133382268/Put/vlen=7, row009/url:col9/1364133382268/Put/vlen=6}
- keyvalues={row010/data:col0/1364133382268/Put/vlen=7, row010/url:col0/1364133382268/Put/vlen=6}
- 正则获取结尾为5的行
- keyvalues={row005/data:col5/1364133382268/Put/vlen=7, row005/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row015/data:col5/1364133382268/Put/vlen=7, row015/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row025/data:col5/1364133382268/Put/vlen=7, row025/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row035/data:col5/1364133382268/Put/vlen=7, row035/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row045/data:col5/1364133382268/Put/vlen=7, row045/url:col5/1364133382268/Put/vlen=6}
- 包行有5的行
- keyvalues={row005/data:col5/1364133382268/Put/vlen=7, row005/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row015/data:col5/1364133382268/Put/vlen=7, row015/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row025/data:col5/1364133382268/Put/vlen=7, row025/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row035/data:col5/1364133382268/Put/vlen=7, row035/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row045/data:col5/1364133382268/Put/vlen=7, row045/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row050/data:col0/1364133382268/Put/vlen=7, row050/url:col0/1364133382268/Put/vlen=6}
- 开头是row01的
- keyvalues={row010/data:col0/1364133382268/Put/vlen=7, row010/url:col0/1364133382268/Put/vlen=6}
- keyvalues={row011/data:col1/1364133382268/Put/vlen=7, row011/url:col1/1364133382268/Put/vlen=6}
- keyvalues={row012/data:col2/1364133382268/Put/vlen=7, row012/url:col2/1364133382268/Put/vlen=6}
- keyvalues={row013/data:col3/1364133382268/Put/vlen=7, row013/url:col3/1364133382268/Put/vlen=6}
- keyvalues={row014/data:col4/1364133382268/Put/vlen=7, row014/url:col4/1364133382268/Put/vlen=6}
- keyvalues={row015/data:col5/1364133382268/Put/vlen=7, row015/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row016/data:col6/1364133382268/Put/vlen=7, row016/url:col6/1364133382268/Put/vlen=6}
- keyvalues={row017/data:col7/1364133382268/Put/vlen=7, row017/url:col7/1364133382268/Put/vlen=6}
- keyvalues={row018/data:col8/1364133382268/Put/vlen=7, row018/url:col8/1364133382268/Put/vlen=6}
- keyvalues={row019/data:col9/1364133382268/Put/vlen=7, row019/url:col9/1364133382268/Put/vlen=6}
复制代码
Operator | Description |
LESS | 小于 |
LESS_OR_EQUAL | 小于等于 |
[EQUAL | 等于 |
NOT_EQUAL | 不等于 |
GREATER_OR_EQUAL | 大于等于 |
GREATER | 大于 |
NO_OP | 排除所有 |
Comparator | Description |
BinaryComparator | 使用Bytes.compareTo()比较 |
BinaryPrefixComparator | 和BinaryComparator差不多,从前面开始比较 |
NullComparator | Does not compare against an actual value but whether a given one is null, or not null. |
BitComparator | Performs a bitwise comparison, providing a BitwiseOp class with OR, and XORoperators. |
RegexStringComparator | 正则表达式 |
SubstringComparator | 把数据当成字符串,用contains()来判断 |
- import java.io.IOException;
- import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.hbase.HBaseConfiguration;
- import org.apache.hadoop.hbase.HColumnDescriptor;
- import org.apache.hadoop.hbase.HTableDescriptor;
- import org.apache.hadoop.hbase.client.HBaseAdmin;
- import org.apache.hadoop.hbase.client.HTable;
- import org.apache.hadoop.hbase.client.Put;
- import org.apache.hadoop.hbase.client.Result;
- import org.apache.hadoop.hbase.client.ResultScanner;
- import org.apache.hadoop.hbase.client.Scan;
- import org.apache.hadoop.hbase.filter.BinaryComparator;
- import org.apache.hadoop.hbase.filter.BinaryPrefixComparator;
- import org.apache.hadoop.hbase.filter.CompareFilter;
- import org.apache.hadoop.hbase.filter.Filter;
- import org.apache.hadoop.hbase.filter.RegexStringComparator;
- import org.apache.hadoop.hbase.filter.RowFilter;
- import org.apache.hadoop.hbase.filter.SubstringComparator;
- public class TestHbaseRowFilter {
- String tableName = "test_row_filter";
- Configuration config = HBaseConfiguration.create();
- /**
- * 部分代码来自hbase权威指南
- * @throws IOException
- */
- public void testRowFilter() throws IOException {
- HTable table = new HTable(config, tableName);
- Scan scan = new Scan();
- System.out.println("小于等于row010的行");
- Filter filter1 = new RowFilter(CompareFilter.CompareOp.LESS_OR_EQUAL,
- new BinaryComparator("row010".getBytes()));
- scan.setFilter(filter1);
- ResultScanner scanner1 = table.getScanner(scan);
- for (Result res : scanner1) {
- System.out.println(res);
- }
- scanner1.close();
- System.out.println("正则获取结尾为5的行");
- Filter filter2 = new RowFilter(CompareFilter.CompareOp.EQUAL,
- new RegexStringComparator(".*5[ DISCUZ_CODE_0 ]quot;));
- scan.setFilter(filter2);
- ResultScanner scanner2 = table.getScanner(scan);
- for (Result res : scanner2) {
- System.out.println(res);
- }
- scanner2.close();
- System.out.println("包含有5的行");
- Filter filter3 = new RowFilter(CompareFilter.CompareOp.EQUAL,
- new SubstringComparator("5"));
- scan.setFilter(filter3);
- ResultScanner scanner3 = table.getScanner(scan);
- for (Result res : scanner3) {
- System.out.println(res);
- }
- scanner3.close();
- System.out.println("开头是row01的");
- Filter filter4 = new RowFilter(CompareFilter.CompareOp.EQUAL,
- new BinaryPrefixComparator("row01".getBytes()));
- scan.setFilter(filter4);
- ResultScanner scanner4 = table.getScanner(scan);
- for (Result res : scanner4) {
- System.out.println(res);
- }
- scanner3.close();
- }
- /**
- * 初始化数据
- */
- public void init() {
- // 创建表和初始化数据
- try {
- HBaseAdmin admin = new HBaseAdmin(config);
- if (!admin.tableExists(tableName)) {
- HTableDescriptor htd = new HTableDescriptor(tableName);
- HColumnDescriptor hcd1 = new HColumnDescriptor("data");
- htd.addFamily(hcd1);
- HColumnDescriptor hcd2 = new HColumnDescriptor("url");
- htd.addFamily(hcd2);
- admin.createTable(htd);
- }
- HTable table = new HTable(config, tableName);
- table.setAutoFlush(false);
- int count = 50;
- for (int i = 1; i <= count; ++i) {
- Put p = new Put(String.format("row%03d", i).getBytes());
- p.add("data".getBytes(), String.format("col%01d", i % 10)
- .getBytes(), String.format("data%03d", i).getBytes());
- p.add("url".getBytes(), String.format("col%01d", i % 10)
- .getBytes(), String.format("url%03d", i).getBytes());
- table.put(p);
- }
- table.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- /**
- * @param args
- * @throws IOException
- */
- public static void main(String[] args) throws IOException {
- TestHbaseRowFilter test = new TestHbaseRowFilter();
- test.init();
- test.testRowFilter();
- }
- }
复制代码
- 小于等于row010的行
- keyvalues={row001/data:col1/1364133382268/Put/vlen=7, row001/url:col1/1364133382268/Put/vlen=6}
- keyvalues={row002/data:col2/1364133382268/Put/vlen=7, row002/url:col2/1364133382268/Put/vlen=6}
- keyvalues={row003/data:col3/1364133382268/Put/vlen=7, row003/url:col3/1364133382268/Put/vlen=6}
- keyvalues={row004/data:col4/1364133382268/Put/vlen=7, row004/url:col4/1364133382268/Put/vlen=6}
- keyvalues={row005/data:col5/1364133382268/Put/vlen=7, row005/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row006/data:col6/1364133382268/Put/vlen=7, row006/url:col6/1364133382268/Put/vlen=6}
- keyvalues={row007/data:col7/1364133382268/Put/vlen=7, row007/url:col7/1364133382268/Put/vlen=6}
- keyvalues={row008/data:col8/1364133382268/Put/vlen=7, row008/url:col8/1364133382268/Put/vlen=6}
- keyvalues={row009/data:col9/1364133382268/Put/vlen=7, row009/url:col9/1364133382268/Put/vlen=6}
- keyvalues={row010/data:col0/1364133382268/Put/vlen=7, row010/url:col0/1364133382268/Put/vlen=6}
- 正则获取结尾为5的行
- keyvalues={row005/data:col5/1364133382268/Put/vlen=7, row005/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row015/data:col5/1364133382268/Put/vlen=7, row015/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row025/data:col5/1364133382268/Put/vlen=7, row025/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row035/data:col5/1364133382268/Put/vlen=7, row035/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row045/data:col5/1364133382268/Put/vlen=7, row045/url:col5/1364133382268/Put/vlen=6}
- 包行有5的行
- keyvalues={row005/data:col5/1364133382268/Put/vlen=7, row005/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row015/data:col5/1364133382268/Put/vlen=7, row015/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row025/data:col5/1364133382268/Put/vlen=7, row025/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row035/data:col5/1364133382268/Put/vlen=7, row035/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row045/data:col5/1364133382268/Put/vlen=7, row045/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row050/data:col0/1364133382268/Put/vlen=7, row050/url:col0/1364133382268/Put/vlen=6}
- 开头是row01的
- keyvalues={row010/data:col0/1364133382268/Put/vlen=7, row010/url:col0/1364133382268/Put/vlen=6}
- keyvalues={row011/data:col1/1364133382268/Put/vlen=7, row011/url:col1/1364133382268/Put/vlen=6}
- keyvalues={row012/data:col2/1364133382268/Put/vlen=7, row012/url:col2/1364133382268/Put/vlen=6}
- keyvalues={row013/data:col3/1364133382268/Put/vlen=7, row013/url:col3/1364133382268/Put/vlen=6}
- keyvalues={row014/data:col4/1364133382268/Put/vlen=7, row014/url:col4/1364133382268/Put/vlen=6}
- keyvalues={row015/data:col5/1364133382268/Put/vlen=7, row015/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row016/data:col6/1364133382268/Put/vlen=7, row016/url:col6/1364133382268/Put/vlen=6}
- keyvalues={row017/data:col7/1364133382268/Put/vlen=7, row017/url:col7/1364133382268/Put/vlen=6}
- keyvalues={row018/data:col8/1364133382268/Put/vlen=7, row018/url:col8/1364133382268/Put/vlen=6}
- keyvalues={row019/data:col9/1364133382268/Put/vlen=7, row019/url:col9/1364133382268/Put/vlen=6}
复制代码
Operator | Description |
LESS | 小于 |
LESS_OR_EQUAL | 小于等于 |
[EQUAL | 等于 |
NOT_EQUAL | 不等于 |
GREATER_OR_EQUAL | 大于等于 |
GREATER | 大于 |
NO_OP | 排除所有 |
Comparator | Description |
BinaryComparator | 使用Bytes.compareTo()比较 |
BinaryPrefixComparator | 和BinaryComparator差不多,从前面开始比较 |
NullComparator | Does not compare against an actual value but whether a given one is null, or not null. |
BitComparator | Performs a bitwise comparison, providing a BitwiseOp class with OR, and XORoperators. |
RegexStringComparator | 正则表达式 |
SubstringComparator | 把数据当成字符串,用contains()来判断 |
- import java.io.IOException;
- import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.hbase.HBaseConfiguration;
- import org.apache.hadoop.hbase.HColumnDescriptor;
- import org.apache.hadoop.hbase.HTableDescriptor;
- import org.apache.hadoop.hbase.client.HBaseAdmin;
- import org.apache.hadoop.hbase.client.HTable;
- import org.apache.hadoop.hbase.client.Put;
- import org.apache.hadoop.hbase.client.Result;
- import org.apache.hadoop.hbase.client.ResultScanner;
- import org.apache.hadoop.hbase.client.Scan;
- import org.apache.hadoop.hbase.filter.BinaryComparator;
- import org.apache.hadoop.hbase.filter.BinaryPrefixComparator;
- import org.apache.hadoop.hbase.filter.CompareFilter;
- import org.apache.hadoop.hbase.filter.Filter;
- import org.apache.hadoop.hbase.filter.RegexStringComparator;
- import org.apache.hadoop.hbase.filter.RowFilter;
- import org.apache.hadoop.hbase.filter.SubstringComparator;
- public class TestHbaseRowFilter {
- String tableName = "test_row_filter";
- Configuration config = HBaseConfiguration.create();
- /**
- * 部分代码来自hbase权威指南
- * @throws IOException
- */
- public void testRowFilter() throws IOException {
- HTable table = new HTable(config, tableName);
- Scan scan = new Scan();
- System.out.println("小于等于row010的行");
- Filter filter1 = new RowFilter(CompareFilter.CompareOp.LESS_OR_EQUAL,
- new BinaryComparator("row010".getBytes()));
- scan.setFilter(filter1);
- ResultScanner scanner1 = table.getScanner(scan);
- for (Result res : scanner1) {
- System.out.println(res);
- }
- scanner1.close();
- System.out.println("正则获取结尾为5的行");
- Filter filter2 = new RowFilter(CompareFilter.CompareOp.EQUAL,
- new RegexStringComparator(".*5[ DISCUZ_CODE_0 ]quot;));
- scan.setFilter(filter2);
- ResultScanner scanner2 = table.getScanner(scan);
- for (Result res : scanner2) {
- System.out.println(res);
- }
- scanner2.close();
- System.out.println("包含有5的行");
- Filter filter3 = new RowFilter(CompareFilter.CompareOp.EQUAL,
- new SubstringComparator("5"));
- scan.setFilter(filter3);
- ResultScanner scanner3 = table.getScanner(scan);
- for (Result res : scanner3) {
- System.out.println(res);
- }
- scanner3.close();
- System.out.println("开头是row01的");
- Filter filter4 = new RowFilter(CompareFilter.CompareOp.EQUAL,
- new BinaryPrefixComparator("row01".getBytes()));
- scan.setFilter(filter4);
- ResultScanner scanner4 = table.getScanner(scan);
- for (Result res : scanner4) {
- System.out.println(res);
- }
- scanner3.close();
- }
- /**
- * 初始化数据
- */
- public void init() {
- // 创建表和初始化数据
- try {
- HBaseAdmin admin = new HBaseAdmin(config);
- if (!admin.tableExists(tableName)) {
- HTableDescriptor htd = new HTableDescriptor(tableName);
- HColumnDescriptor hcd1 = new HColumnDescriptor("data");
- htd.addFamily(hcd1);
- HColumnDescriptor hcd2 = new HColumnDescriptor("url");
- htd.addFamily(hcd2);
- admin.createTable(htd);
- }
- HTable table = new HTable(config, tableName);
- table.setAutoFlush(false);
- int count = 50;
- for (int i = 1; i <= count; ++i) {
- Put p = new Put(String.format("row%03d", i).getBytes());
- p.add("data".getBytes(), String.format("col%01d", i % 10)
- .getBytes(), String.format("data%03d", i).getBytes());
- p.add("url".getBytes(), String.format("col%01d", i % 10)
- .getBytes(), String.format("url%03d", i).getBytes());
- table.put(p);
- }
- table.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- /**
- * @param args
- * @throws IOException
- */
- public static void main(String[] args) throws IOException {
- TestHbaseRowFilter test = new TestHbaseRowFilter();
- test.init();
- test.testRowFilter();
- }
- }
复制代码
- 小于等于row010的行
- keyvalues={row001/data:col1/1364133382268/Put/vlen=7, row001/url:col1/1364133382268/Put/vlen=6}
- keyvalues={row002/data:col2/1364133382268/Put/vlen=7, row002/url:col2/1364133382268/Put/vlen=6}
- keyvalues={row003/data:col3/1364133382268/Put/vlen=7, row003/url:col3/1364133382268/Put/vlen=6}
- keyvalues={row004/data:col4/1364133382268/Put/vlen=7, row004/url:col4/1364133382268/Put/vlen=6}
- keyvalues={row005/data:col5/1364133382268/Put/vlen=7, row005/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row006/data:col6/1364133382268/Put/vlen=7, row006/url:col6/1364133382268/Put/vlen=6}
- keyvalues={row007/data:col7/1364133382268/Put/vlen=7, row007/url:col7/1364133382268/Put/vlen=6}
- keyvalues={row008/data:col8/1364133382268/Put/vlen=7, row008/url:col8/1364133382268/Put/vlen=6}
- keyvalues={row009/data:col9/1364133382268/Put/vlen=7, row009/url:col9/1364133382268/Put/vlen=6}
- keyvalues={row010/data:col0/1364133382268/Put/vlen=7, row010/url:col0/1364133382268/Put/vlen=6}
- 正则获取结尾为5的行
- keyvalues={row005/data:col5/1364133382268/Put/vlen=7, row005/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row015/data:col5/1364133382268/Put/vlen=7, row015/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row025/data:col5/1364133382268/Put/vlen=7, row025/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row035/data:col5/1364133382268/Put/vlen=7, row035/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row045/data:col5/1364133382268/Put/vlen=7, row045/url:col5/1364133382268/Put/vlen=6}
- 包行有5的行
- keyvalues={row005/data:col5/1364133382268/Put/vlen=7, row005/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row015/data:col5/1364133382268/Put/vlen=7, row015/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row025/data:col5/1364133382268/Put/vlen=7, row025/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row035/data:col5/1364133382268/Put/vlen=7, row035/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row045/data:col5/1364133382268/Put/vlen=7, row045/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row050/data:col0/1364133382268/Put/vlen=7, row050/url:col0/1364133382268/Put/vlen=6}
- 开头是row01的
- keyvalues={row010/data:col0/1364133382268/Put/vlen=7, row010/url:col0/1364133382268/Put/vlen=6}
- keyvalues={row011/data:col1/1364133382268/Put/vlen=7, row011/url:col1/1364133382268/Put/vlen=6}
- keyvalues={row012/data:col2/1364133382268/Put/vlen=7, row012/url:col2/1364133382268/Put/vlen=6}
- keyvalues={row013/data:col3/1364133382268/Put/vlen=7, row013/url:col3/1364133382268/Put/vlen=6}
- keyvalues={row014/data:col4/1364133382268/Put/vlen=7, row014/url:col4/1364133382268/Put/vlen=6}
- keyvalues={row015/data:col5/1364133382268/Put/vlen=7, row015/url:col5/1364133382268/Put/vlen=6}
- keyvalues={row016/data:col6/1364133382268/Put/vlen=7, row016/url:col6/1364133382268/Put/vlen=6}
- keyvalues={row017/data:col7/1364133382268/Put/vlen=7, row017/url:col7/1364133382268/Put/vlen=6}
- keyvalues={row018/data:col8/1364133382268/Put/vlen=7, row018/url:col8/1364133382268/Put/vlen=6}
- keyvalues={row019/data:col9/1364133382268/Put/vlen=7, row019/url:col9/1364133382268/Put/vlen=6}
复制代码
hbase RowFilter如何根据rowkey查询以及实例实现代码 habase模糊查询【转】的更多相关文章
-
Python 代码实现模糊查询
Python 代码实现模糊查询 1.导语: 模糊匹配可以算是现代编辑器(如 Eclipse 等各种 IDE)的一个必备特性了,它所做的就是根据用户输入的部分内容,猜测用户想要的文件名,并提供一个推荐列 ...
-
query_string查询支持全部的Apache Lucene查询语法 低频词划分依据 模糊查询 Disjunction Max
3.3 基本查询3.3.1词条查询 词条查询是未经分析的,要跟索引文档中的词条完全匹配注意:在输入数据中,title字段含有Crime and Punishment,但我们使用小写开头的crime来搜 ...
-
10 行 Python 代码实现模糊查询/智能提示
10 行 Python 代码实现模糊查询/智能提示 1.导语: 模糊匹配可以算是现代编辑器(如 Eclipse 等各种 IDE)的一个必备特性了,它所做的就是根据用户输入的部分内容,猜测用户想要的 ...
-
ASP.NET MVC+EF框架+EasyUI实现权限管理系列(20)-多条件模糊查询和回收站还原的实现
原文:ASP.NET MVC+EF框架+EasyUI实现权限管理系列(20)-多条件模糊查询和回收站还原的实现 ASP.NET MVC+EF框架+EasyUI实现权限管系列 (开篇) (1):框架 ...
-
stark组件的分页,模糊查询,批量删除
1.分页组件高阶 2.整合展示数据showlist类 3.stark组件之分页 3.stark组件之search模糊查询 4.action批量处理数据 4.总结 1.分页组件高阶 1.分页的class ...
-
10 star组件之分页, search模糊查询, action批量处理
1.分页组件高阶 1.分页的class形式(有bug,请看下面的) """ 自定义分页组件 """ class Pagination(obj ...
-
ASP.NET操作ORACLE数据库之模糊查询
ASP.NET操作ORACLE数据库之模糊查询 一.ASP.NET MVC利用OracleHelper辅助类操作ORACLE数据库 //连接Oracle数据库的连接字符串 string connect ...
-
T-SQL---多值模糊查询的处理
多值模糊查询的处理 所谓多值模糊查询,就是应用程序中传递过来多个参数,对这些参数做拆分,拆分之后,对拆分结果的key值分别做模糊查询处理 对于精确匹配时,不管是单个Key值还是多个Key值,都很容易处 ...
-
JAVA 模糊查询方法
当我们需要开发一个方法用来查询数据库的时候,往往会遇到这样一个问题:就是不知道用户到底会输入什么条件,那么怎么样处理sql语句才能让我们开发的方法不管接受到什么样的条件都可以正常工作呢?这时where ...
随机推荐
-
MQTT V3.1--我的理解
最近因为工作需要,需要对推送消息了解,因此对MQTT进行了整理,这里更多的是对MQTT英文版的翻译和理解. MQTT(Message Queue Telemetry Transport),遥测传输协议 ...
-
[.NET领域驱动设计实战系列]专题九:DDD案例:网上书店AOP和站点地图的实现
一.引言 在前面一专题介绍到,要让缓存生效还需要实现对AOP(面向切面编程)的支持.所以本专题将介绍了网上书店案例中AOP的实现.关于AOP的概念,大家可以参考文章:http://www.cnblog ...
-
基础知识系列☞C#中→属性和字段的区别
"好吧...准备写个'基础知识系列',算是记录下吧,时时看看,更加加深记忆···" 其实本来准备叫"面试系列"... 字段.属性.你先知道的哪个概念? ***我 ...
-
双绞线线序+POE供电网线
0 重点 一般情况下会用1236(橙白.橙.绿白.绿)传输数据,1.2用于发送,3.6用于接收,45(蓝.蓝白)电源正极 78(棕白.棕)电源负极. 一 网线线序 12发 36收 二 poe网线供电 ...
-
H5 input type=";search"; 不显示搜索 解决方法
在IOS(ipad iPhone等)系统的浏览器里打开H5页面.如下写法: <input type="search" name="search” id=" ...
-
Shadow Mapping 的原理与实践(一)
早在上世纪七十年代末,Williams在他的“Casting Curved Shadows on Curved Surface”一文中提出了名为Shadow Map的阴影生成技术.之后,他人在此基础上 ...
-
R语言的数据结构
首先声明,R语言对大小写敏感. 一.向量 vector类型可以存储数字.字符和逻辑类型.构建函数为C(): > a <- c(1,2,3,4) > b <- c('dau',' ...
-
Spring.NET程序
第一个Spring.NET程序 Spring.NET环境准备 pring.NET 1.3.2下载地址:http://down.51cto.com/data/861700 下载后解压 Spring. ...
-
jsplumb 中文基础教程
jsplumb 中文基础教程 https://github.com/wangduanduan/jsplumb-chinese-tutorial
-
ElasticSearch(十)Elasticsearch检索出的数据列表按字段匹配的优先顺序及搜索单词拼音一部分搜不到数据
检索出的数据列表按字段匹配的优先顺序 一.举例 比如,发布一篇文章,文章包括基本的字段包括标题.发布时间.点击率.关键字.内容.当在页面中输入“教育”搜索关键词,会检索出指定字段包括“教育”的所有数据 ...