Package org.apache.hadoop.hbase.index.client

Examples of org.apache.hadoop.hbase.index.client.RangeExpression


    equalsExpression = new EqualsExpression(column, value2);
    singleIndexExpression.addEqualsExpression(equalsExpression);
    column = new Column(FAMILY1, QUALIFIER3);
    byte[] value3_1 = Bytes.toBytes(10.4F);
    byte[] value3_2 = Bytes.toBytes(16.91F);
    RangeExpression re = new RangeExpression(column, value3_1, value3_2, true, false);
    singleIndexExpression.setRangeExpression(re);

    Scan scan = new Scan();
    scan.setAttribute(Constants.INDEX_EXPRESSION, IndexUtils.toBytes(singleIndexExpression));
    FilterList fl = new FilterList(Operator.MUST_PASS_ALL);
View Full Code Here


    EqualsExpression equalsExpression = new EqualsExpression(column, value2);
    singleIndexExpression.addEqualsExpression(equalsExpression);
    column = new Column(FAMILY1, QUALIFIER3);
    byte[] value3_1 = Bytes.toBytes(10.4F);
    byte[] value3_2 = Bytes.toBytes(16.91F);
    RangeExpression re = new RangeExpression(column, value3_1, value3_2, true, false);
    singleIndexExpression.setRangeExpression(re);
    multiIndexExpression.addIndexExpression(singleIndexExpression);

    MultiIndexExpression multiIndexExpression2 = new MultiIndexExpression(GroupingCondition.OR);
    String index2 = "idx2";
View Full Code Here

        fcvd.maxValueLength = cq.getMaxValueLength();
        fcvd.valueType = cq.getType();
        fcvds.add(fcvd);
      }
      // RangeExpression to come after the EqualsExpressions
      RangeExpression re = sie.getRangeExpression();
      if (re != null) {
        ColumnQualifier cq = colVsCQ.get(re.getColumn());
        if (cq == null) {
          throw new RuntimeException("The column:[" + re.getColumn() + "] is not a part of index: "
              + sie.getIndexName());
        }
        CompareOp lowerBoundCompareOp =
            re.isLowerBoundInclusive() ? CompareOp.GREATER_OR_EQUAL : CompareOp.GREATER;
        CompareOp upperBoundCompareOp =
            re.isUpperBoundInclusive() ? CompareOp.LESS_OR_EQUAL : CompareOp.LESS;
        if (re.getLowerBoundValue() == null) {
          lowerBoundCompareOp = null;
        }
        if (re.getUpperBoundValue() == null) {
          upperBoundCompareOp = null;
        }
        FilterColumnValueRange fcvr =
            new FilterColumnValueRange(re.getColumn(), re.getLowerBoundValue(),
                lowerBoundCompareOp, re.getUpperBoundValue(), upperBoundCompareOp);
        fcvr.maxValueLength = cq.getMaxValueLength();
        fcvr.valueType = cq.getType();
        fcvds.add(fcvr);
      }
      nlfn.addIndicesToUse(fcvds, index);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.index.client.RangeExpression

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.