Hbase Filter过滤器查询详解 (2)

              Scan scan = new Scan(Bytes.toBytes("person_rk_bj_zhang_000001"), Bytes.toBytes("person_rk_bj_zhang_000002"));

             

        //前缀过滤器----针对行键

              Filter filter = new PrefixFilter(Bytes.toBytes("rk"));

             

        //行过滤器  ---针对行键

              ByteArrayComparable rowComparator = new BinaryComparator(Bytes.toBytes("person_rk_bj_zhang_000001"));

              RowFilter rf = new RowFilter(CompareOp.LESS_OR_EQUAL, rowComparator);

             

              /**

         * 假设rowkey格式为:创建日期_发布日期_ID_TITLE

         * 目标:查找  发布日期  为  2014-12-21  的数据

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zgyzjp.html