Package org.apache.hadoop.hbase.hbql.filter

Examples of org.apache.hadoop.hbase.hbql.filter.SingleColumnValueFilter


    static byte[] val1   = Bytes.toBytes("val1");
    static byte[] val2   = Bytes.toBytes("val2");

    public static void main(String[] args) throws HBqlException, IOException {

        final SingleColumnValueFilter val1Filter11 = new SingleColumnValueFilter(family,
                                                                                 val1,
                                                                                 CompareFilter.CompareOp.EQUAL,
                                                                                 Bytes.toBytes("11"));

        final SingleColumnValueFilter val2Filter10 = new SingleColumnValueFilter(family,
                                                                                 val2,
                                                                                 CompareFilter.CompareOp.EQUAL,
                                                                                 Bytes.toBytes(10));

        doQuery("Results for val2 = 10 || va1l = '11'", val2Filter10, val1Filter11);
View Full Code Here


        // Bail if expression uses a row key.
        if (attrib.isAKeyAttrib())
            throw new InvalidServerFilterException("Cannot use a key attribute");

        final SingleColumnValueFilter filter = new SingleColumnValueFilter(attrib.getFamilyNameAsBytes(),
                                                                           attrib.getColumnNameAsBytes(),
                                                                           compareOp,
                                                                           comparator);
        filter.setFilterIfMissing(true);
        return filter;
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.hbql.filter.SingleColumnValueFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.