Package org.apache.hadoop.hbase.filter

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


      else
        startColumn = new BinaryComparator(from.getKey());
      if (from.isInclusive())
        fromInclusive1 = CompareOp.GREATER_OR_EQUAL;
    }
    return new ValueFilter(fromInclusive1, startColumn);
  }
View Full Code Here


        endColumn = new BinaryComparator(to.getKey());

      if (to.isInclusive())
        toInclusive1 = CompareOp.LESS_OR_EQUAL;
    }
    return new ValueFilter(toInclusive1, endColumn);
  }
View Full Code Here

      for (byte[] key : values) {
        Get get = new Get(rowKey);
        CompareFilter.CompareOp equal = CompareOp.EQUAL;
        if (key != null) {
          BinaryComparator valueComparator = createComparaor(key);
          ValueFilter filter = new ValueFilter(equal, valueComparator);
          get.setFilter(filter);
          get.addFamily(family);
          listGet.add(get);
        }
      }
View Full Code Here

      List<Get> listGet = new ArrayList<Get>();
      for (byte[] key : values) {
        Get get = new Get(rowKey);
        CompareFilter.CompareOp equal = CompareOp.EQUAL;
        BinaryComparator endColumn1 = new BinaryComparator(key);
        ValueFilter filter = new ValueFilter(equal, endColumn1);
        get.setFilter(filter);
        get.addFamily(family);
        listGet.add(get);
      }
      try {
View Full Code Here

      byte[] family = Bytes.toBytes(indexTableName);
      Scan scan = new Scan(rowKey, rowKey);
      scan.addFamily(family);
      FilterList list = new FilterList(FilterList.Operator.MUST_PASS_ALL);
      if (from != null) {
        ValueFilter fromfilter = createFilterFrom();
        list.addFilter(fromfilter);
      }
      if (to != null) {
        ValueFilter toFilter = createFilterTo();
        list.addFilter(toFilter);
      }
      if (!list.getFilters().isEmpty())
        scan.setFilter(list);
      if (batchSize != null)
View Full Code Here

    if (from != null) {
      startColumn = new BinaryComparator(from.getKey());
      if (from.isInclusive())
        fromInclusive1 = CompareOp.GREATER_OR_EQUAL;
    }
    return new ValueFilter(fromInclusive1, startColumn);
  }
View Full Code Here

    if (to != null) {
      endColumn = new BinaryComparator(to.getKey());
      if (to.isInclusive())
        toInclusive1 = CompareOp.LESS_OR_EQUAL;
    }
    return new ValueFilter(toInclusive1, endColumn);
  }
View Full Code Here

    helper.fillTable("testtable", 1, 30, 5, 2, true, true, "colfam1");

    HTable table = new HTable(conf, "testtable");

    // vv SkipFilterExample
    Filter filter1 = new ValueFilter(CompareFilter.CompareOp.NOT_EQUAL,
      new BinaryComparator(Bytes.toBytes("val-0")));

    Scan scan = new Scan();
    scan.setFilter(filter1); // co SkipFilterExample-1-AddFilter1 Only add the ValueFilter to the first scan.
    ResultScanner scanner1 = table.getScanner(scan);
View Full Code Here

    helper.fillTable("testtable", 1, 10, 10, "colfam1", "colfam2");

    HTable table = new HTable(conf, "testtable");

    // vv ValueFilterExample
    Filter filter = new ValueFilter(CompareFilter.CompareOp.EQUAL, // co ValueFilterExample-1-Filter Create filter, while specifying the comparison operator and comparator.
      new SubstringComparator(".4"));

    Scan scan = new Scan();
    scan.setFilter(filter); // co ValueFilterExample-2-SetFilter Set filter for the scan.
    ResultScanner scanner = table.getScanner(scan);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.filter.ValueFilter

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.