Examples of filterRowKey()


Examples of org.apache.hadoop.hbase.filter.Filter.filterRowKey()

    Filter deserializedFilter = FilterList.parseFrom(serializedFilter);

    // Filter an entity with the deserialized filter.
    EntityId entityId = factory.getEntityId(10, 10L);
    byte[] hbaseKey = entityId.getHBaseRowKey();
    boolean filtered = deserializedFilter.filterRowKey(hbaseKey, 0, hbaseKey.length);
    assertEquals(INCLUDE, filtered);
  }

  @Test
  public void testHashIsCalculatedWhenAllHashComponentsAreSpecified() throws Exception {
View Full Code Here

Examples of org.apache.hadoop.hbase.filter.Filter.filterRowKey()

    // A row key with a different hash but the same first component should be
    // excluded by the filter. The hash is 0x9f0f
    hbaseKey[0] = (byte) 0x7F;
    hbaseKey[1] = (byte) 0xFF;
    boolean filtered = hbaseFilter.filterRowKey(hbaseKey, 0, hbaseKey.length);
    doInclusionAssert(rowKeyFormat, filter, entityId, hbaseFilter, hbaseKey, EXCLUDE);
  }

  @Test
  public void testHashWildcardIsUsedForMissingHashComponents() throws Exception {
View Full Code Here

Examples of org.apache.hadoop.hbase.filter.Filter.filterRowKey()

      List<KeyValue> nkvs = new ArrayList<KeyValue>(kvs.size());
      for (KeyValue kv : kvs) {
        if (filter.filterAllRemaining()) {
          break;
        }
        if (filter.filterRowKey(kv.getBuffer(), kv.getRowOffset(), kv.getRowLength())) {
          continue;
        }
        if (filter.filterKeyValue(kv) == ReturnCode.INCLUDE) {
          nkvs.add(kv);
        }
View Full Code Here

Examples of org.apache.hadoop.hbase.filter.Filter.filterRowKey()

        List<KeyValue> nkvs = new ArrayList<KeyValue>(kvs.size());
        for (KeyValue kv : kvs) {
          if (filter.filterAllRemaining()) {
            break;
          }
          if (filter.filterRowKey(kv.getBuffer(), kv.getRowOffset(), kv.getRowLength())) {
            continue;
          }
          ReturnCode filterResult = filter.filterKeyValue(kv);
          if (filterResult == ReturnCode.INCLUDE) {
            nkvs.add(kv);
View Full Code Here

Examples of org.apache.hadoop.hbase.filter.Filter.filterRowKey()

            List<KeyValue> nkvs = new ArrayList<KeyValue>(kvs.size());
            for (KeyValue kv : kvs) {
                if (filter.filterAllRemaining()) {
                    break;
                }
                if (filter.filterRowKey(kv.getBuffer(), kv.getRowOffset(), kv.getRowLength())) {
                    continue;
                }
                if (filter.filterKeyValue(kv) == ReturnCode.INCLUDE) {
                    nkvs.add(kv);
                }
View Full Code Here

Examples of org.apache.hadoop.hbase.filter.Filter.filterRowKey()

                List<KeyValue> nkvs = new ArrayList<KeyValue>(kvs.size());
                for (KeyValue kv : kvs) {
                    if (filter.filterAllRemaining()) {
                        break;
                    }
                    if (filter.filterRowKey(kv.getBuffer(), kv.getRowOffset(), kv.getRowLength())) {
                        continue;
                    }
                    ReturnCode filterResult = filter.filterKeyValue(kv);
                    if (filterResult == ReturnCode.INCLUDE) {
                        nkvs.add(kv);
View Full Code Here

Examples of org.apache.hadoop.hbase.filter.Filter.filterRowKey()

      {
        if (filter.filterAllRemaining())
        {
          break;
        }
        if (filter.filterRowKey(kv.getBuffer(), kv.getRowOffset(), kv.getRowLength()))
        {
          continue;
        }
        if (filter.filterKeyValue(kv) == ReturnCode.INCLUDE)
        {
View Full Code Here

Examples of org.apache.hadoop.hbase.filter.Filter.filterRowKey()

        {
          if (filter.filterAllRemaining())
          {
            break;
          }
          if (filter.filterRowKey(kv.getBuffer(), kv.getRowOffset(), kv.getRowLength()))
          {
            continue;
          }
          ReturnCode filterResult = filter.filterKeyValue(kv);
          if (filterResult == ReturnCode.INCLUDE)
View Full Code Here

Examples of org.apache.hadoop.hbase.filter.RowFilter.filterRowKey()

        if (key.length == 0 || option == null)
            return false;

        BinaryComparator comp = new BinaryComparator(option);
        RowFilter rowFilter = new RowFilter(op, comp);
        return rowFilter.filterRowKey(key, 0, key.length);
    }

    protected class HBaseTableRecordReader extends TableRecordReader {

        private long recordsSeen = 0;
View Full Code Here

Examples of org.apache.hadoop.hbase.filter.RowFilter.filterRowKey()

        if (key.length == 0 || option == null)
            return false;

        BinaryComparator comp = new BinaryComparator(option);
        RowFilter rowFilter = new RowFilter(op, comp);
        return rowFilter.filterRowKey(key, 0, key.length);
    }

    protected class HBaseTableRecordReader extends TableRecordReader {

        private long recordsSeen = 0;
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.