Examples of SingleColumnValueFilter


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

      FlushThread flushThread = new FlushThread();
      flushThread.start();

      Scan scan = new Scan();
      scan.addFamily(family);
      scan.setFilter(new SingleColumnValueFilter(family, qual1,
          CompareOp.EQUAL, new BinaryComparator(Bytes.toBytes(5L))));

      int expectedCount = 0;
      List<KeyValue> res = new ArrayList<KeyValue>();
View Full Code Here

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

      region.put(put);

      Scan idxScan = new Scan();
      idxScan.addFamily(family);
      idxScan.setFilter(new FilterList(FilterList.Operator.MUST_PASS_ALL,
          Arrays.<Filter>asList(new SingleColumnValueFilter(family, qual1,
              CompareOp.GREATER_OR_EQUAL,
              new BinaryComparator(Bytes.toBytes(0L))),
              new SingleColumnValueFilter(family, qual1, CompareOp.LESS_OR_EQUAL,
                  new BinaryComparator(Bytes.toBytes(3L)))
              )));
      InternalScanner scanner = region.getScanner(idxScan);
      List<KeyValue> res = new ArrayList<KeyValue>();
View Full Code Here

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

        if (scanner != null) scanner.close();
      }
    }

    protected Scan constructScan(byte[] valuePrefix) throws IOException {
      Filter filter = new SingleColumnValueFilter(
          FAMILY_NAME, QUALIFIER_NAME, CompareFilter.CompareOp.EQUAL,
          new BinaryComparator(valuePrefix)
      );
      Scan scan = new Scan();
      scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
View Full Code Here

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

  private ResultScanner buildScanner(String keyPrefix, String value, HTable ht)
      throws IOException {
    // OurFilterList allFilters = new OurFilterList();
    FilterList allFilters = new FilterList(/* FilterList.Operator.MUST_PASS_ALL */);
    allFilters.addFilter(new PrefixFilter(Bytes.toBytes(keyPrefix)));
    SingleColumnValueFilter filter = new SingleColumnValueFilter(Bytes
        .toBytes("trans-tags"), Bytes.toBytes("qual2"), CompareOp.EQUAL, Bytes
        .toBytes(value));
    filter.setFilterIfMissing(true);
    allFilters.addFilter(filter);

    // allFilters.addFilter(new
    // RowExcludingSingleColumnValueFilter(Bytes.toBytes("trans-tags"),
    // Bytes.toBytes("qual2"), CompareOp.EQUAL, Bytes.toBytes(value)));
View Full Code Here

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

        if (scanner != null) scanner.close();
      }
    }

    protected Scan constructScan(byte[] valuePrefix) throws IOException {
      Filter filter = new SingleColumnValueFilter(
          FAMILY_NAME, QUALIFIER_NAME, CompareFilter.CompareOp.EQUAL,
          new BinaryComparator(valuePrefix)
      );
      Scan scan = new Scan();
      scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
View Full Code Here

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

  private ResultScanner buildScanner(String keyPrefix, String value, HTable ht)
      throws IOException {
    // OurFilterList allFilters = new OurFilterList();
    FilterList allFilters = new FilterList(/* FilterList.Operator.MUST_PASS_ALL */);
    allFilters.addFilter(new PrefixFilter(Bytes.toBytes(keyPrefix)));
    SingleColumnValueFilter filter = new SingleColumnValueFilter(Bytes
        .toBytes("trans-tags"), Bytes.toBytes("qual2"), CompareOp.EQUAL, Bytes
        .toBytes(value));
    filter.setFilterIfMissing(true);
    allFilters.addFilter(filter);

    // allFilters.addFilter(new
    // RowExcludingSingleColumnValueFilter(Bytes.toBytes("trans-tags"),
    // Bytes.toBytes("qual2"), CompareOp.EQUAL, Bytes.toBytes(value)));
View Full Code Here

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

  throws IOException {
    // Defaults FilterList.Operator.MUST_PASS_ALL.
    FilterList allFilters = new FilterList();
    allFilters.addFilter(new PrefixFilter(Bytes.toBytes(keyPrefix)));
    // Only return rows where this column value exists in the row.
    SingleColumnValueFilter filter =
      new SingleColumnValueFilter(Bytes.toBytes("trans-tags"),
        Bytes.toBytes("qual2"), CompareOp.EQUAL, Bytes.toBytes(value));
    filter.setFilterIfMissing(true);
    allFilters.addFilter(filter);
    Scan scan = new Scan();
    scan.addFamily(Bytes.toBytes("trans-blob"));
    scan.addFamily(Bytes.toBytes("trans-type"));
    scan.addFamily(Bytes.toBytes("trans-date"));
View Full Code Here

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

      FlushThread flushThread = new FlushThread();
      flushThread.start();

      Scan scan = new Scan();
      scan.addFamily(family);
      scan.setFilter(new SingleColumnValueFilter(family, qual1,
          CompareOp.EQUAL, new BinaryComparator(Bytes.toBytes(5L))));

      int expectedCount = 0;
      List<KeyValue> res = new ArrayList<KeyValue>();
View Full Code Here

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

      region.put(put);

      Scan idxScan = new Scan();
      idxScan.addFamily(family);
      idxScan.setFilter(new FilterList(FilterList.Operator.MUST_PASS_ALL,
          Arrays.<Filter>asList(new SingleColumnValueFilter(family, qual1,
              CompareOp.GREATER_OR_EQUAL,
              new BinaryComparator(Bytes.toBytes(0L))),
              new SingleColumnValueFilter(family, qual1, CompareOp.LESS_OR_EQUAL,
                  new BinaryComparator(Bytes.toBytes(3L)))
              )));
      InternalScanner scanner = region.getScanner(idxScan);
      List<KeyValue> res = new ArrayList<KeyValue>();
View Full Code Here

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

  throws IOException {
    // Defaults FilterList.Operator.MUST_PASS_ALL.
    FilterList allFilters = new FilterList();
    allFilters.addFilter(new PrefixFilter(Bytes.toBytes(keyPrefix)));
    // Only return rows where this column value exists in the row.
    SingleColumnValueFilter filter =
      new SingleColumnValueFilter(Bytes.toBytes("trans-tags"),
        Bytes.toBytes("qual2"), CompareOp.EQUAL, Bytes.toBytes(value));
    filter.setFilterIfMissing(true);
    allFilters.addFilter(filter);
    Scan scan = new Scan();
    scan.addFamily(Bytes.toBytes("trans-blob"));
    scan.addFamily(Bytes.toBytes("trans-type"));
    scan.addFamily(Bytes.toBytes("trans-date"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.