Java 类org.apache.hadoop.hbase.filter.FilterAllFilter 实例源码

项目:ditb    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Scan scan = new Scan(getRandomRow(this.rand, opts.totalRows));
  scan.setCaching(opts.caching);
  FilterList list = new FilterList();
  if (opts.addColumns) {
    scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  } else {
    scan.addFamily(FAMILY_NAME);
  }
  if (opts.filterAll) {
    list.addFilter(new FilterAllFilter());
  }
  list.addFilter(new WhileMatchFilter(new PageFilter(120)));
  scan.setFilter(list);
  ResultScanner s = this.table.getScanner(scan);
  for (Result rr; (rr = s.next()) != null;) {
    updateValueSize(rr);
  }
  s.close();
}
项目:ditb    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  if (this.testScanner == null) {
    Scan scan = new Scan(format(opts.startRow));
    scan.setCaching(opts.caching);
    if (opts.addColumns) {
      scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
    } else {
      scan.addFamily(FAMILY_NAME);
    }
    if (opts.filterAll) {
      scan.setFilter(new FilterAllFilter());
    }
   this.testScanner = table.getScanner(scan);
  }
  Result r = testScanner.next();
  updateValueSize(r);
}
项目:ditb    文件:PerformanceEvaluation.java   
protected Scan constructScan(byte[] valuePrefix) throws IOException {
  FilterList list = new FilterList();
  Filter filter = new SingleColumnValueFilter(
      FAMILY_NAME, COLUMN_ZERO, CompareFilter.CompareOp.EQUAL,
      new BinaryComparator(valuePrefix)
  );
  list.addFilter(filter);
  if(opts.filterAll) {
    list.addFilter(new FilterAllFilter());
  }
  Scan scan = new Scan();
  scan.setCaching(opts.caching);
  if (opts.addColumns) {
    scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  } else {
    scan.addFamily(FAMILY_NAME);
  }
  scan.setFilter(list);
  return scan;
}
项目:ditb    文件:TestRegionObserverInterface.java   
@Test(timeout = 300000)
public void testHBASE14489() throws IOException {
  TableName tableName = TableName.valueOf("testHBASE14489");
  HTable table = util.createTable(tableName, new byte[][] { A });
  Put put = new Put(ROW);
  put.addColumn(A, A, A);
  table.put(put);

  Scan s = new Scan();
  s.setFilter(new FilterAllFilter());
  ResultScanner scanner = table.getScanner(s);
  try {
    for (Result rr = scanner.next(); rr != null; rr = scanner.next()) {
    }
  } finally {
    scanner.close();
  }
  verifyMethodResult(SimpleRegionObserver.class, new String[] { "wasScannerFilterRowCalled" },
    tableName, new Boolean[] { true });
  util.deleteTable(tableName);
  table.close();
}
项目:pbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Scan scan = new Scan(getRandomRow(this.rand, opts.totalRows));
  FilterList list = new FilterList();
  scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  if (opts.filterAll) {
    list.addFilter(new FilterAllFilter());
  }
  list.addFilter(new WhileMatchFilter(new PageFilter(120)));
  scan.setFilter(list);
  ResultScanner s = this.table.getScanner(scan);
  for (Result rr; (rr = s.next()) != null;) {
    updateValueSize(rr);
  }
  s.close();
}
项目:pbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Pair<byte[], byte[]> startAndStopRow = getStartAndStopRow();
  Scan scan = new Scan(startAndStopRow.getFirst(), startAndStopRow.getSecond());
  if (opts.filterAll) {
    scan.setFilter(new FilterAllFilter());
  }
  scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  Result r = null;
  int count = 0;
  ResultScanner s = this.table.getScanner(scan);
  for (; (r = s.next()) != null;) {
    updateValueSize(r);
    count++;
  }
  if (i % 100 == 0) {
    LOG.info(String.format("Scan for key range %s - %s returned %s rows",
        Bytes.toString(startAndStopRow.getFirst()),
        Bytes.toString(startAndStopRow.getSecond()), count));
  }

  s.close();
}
项目:pbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException, InterruptedException {
  if (opts.randomSleep > 0) {
    Thread.sleep(rd.nextInt(opts.randomSleep));
  }
  Get get = new Get(getRandomRow(this.rand, opts.totalRows));
  get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  get.setConsistency(consistency);
  if (LOG.isTraceEnabled()) LOG.trace(get.toString());
  if (opts.multiGet > 0) {
    this.gets.add(get);
    if (this.gets.size() == opts.multiGet) {
      Result [] rs = this.table.get(this.gets);
      updateValueSize(rs);
      this.gets.clear();
    }
  } else {
    updateValueSize(this.table.get(get));
  }
}
项目:HIndex    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Pair<byte[], byte[]> startAndStopRow = getStartAndStopRow();
  Scan scan = new Scan(startAndStopRow.getFirst(), startAndStopRow.getSecond());
  if (opts.filterAll) {
    scan.setFilter(new FilterAllFilter());
  }
  scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  ResultScanner s = this.table.getScanner(scan);
  int count = 0;
  for (Result rr; (rr = s.next()) != null;) {
    count++;
  }

  if (i % 100 == 0) {
    LOG.info(String.format("Scan for key range %s - %s returned %s rows",
        Bytes.toString(startAndStopRow.getFirst()),
        Bytes.toString(startAndStopRow.getSecond()), count));
  }

  s.close();
}
项目:hbase    文件:TestRegionObserverInterface.java   
@Test
public void testHBASE14489() throws IOException {
  final TableName tableName = TableName.valueOf(name.getMethodName());
  Table table = util.createTable(tableName, new byte[][] { A });
  Put put = new Put(ROW);
  put.addColumn(A, A, A);
  table.put(put);

  Scan s = new Scan();
  s.setFilter(new FilterAllFilter());
  ResultScanner scanner = table.getScanner(s);
  try {
    for (Result rr = scanner.next(); rr != null; rr = scanner.next()) {
    }
  } finally {
    scanner.close();
  }
  verifyMethodResult(SimpleRegionObserver.class, new String[] { "wasScannerFilterRowCalled" },
    tableName, new Boolean[] { true });
  util.deleteTable(tableName);
  table.close();

}
项目:hbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  if (this.testScanner == null) {
    Scan scan =
        new Scan().withStartRow(format(opts.startRow)).setCaching(opts.caching)
            .setCacheBlocks(opts.cacheBlocks).setAsyncPrefetch(opts.asyncPrefetch)
            .setReadType(opts.scanReadType);
    if (opts.addColumns) {
      scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
    } else {
      scan.addFamily(FAMILY_NAME);
    }
    if (opts.filterAll) {
      scan.setFilter(new FilterAllFilter());
    }
    this.testScanner = asyncTable.getScanner(scan);
  }
  Result r = testScanner.next();
  updateValueSize(r);
}
项目:hbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Scan scan = new Scan().withStartRow(getRandomRow(this.rand, opts.totalRows))
      .setCaching(opts.caching).setCacheBlocks(opts.cacheBlocks)
      .setAsyncPrefetch(opts.asyncPrefetch).setReadType(opts.scanReadType);
  FilterList list = new FilterList();
  if (opts.addColumns) {
    scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  } else {
    scan.addFamily(FAMILY_NAME);
  }
  if (opts.filterAll) {
    list.addFilter(new FilterAllFilter());
  }
  list.addFilter(new WhileMatchFilter(new PageFilter(120)));
  scan.setFilter(list);
  ResultScanner s = this.table.getScanner(scan);
  for (Result rr; (rr = s.next()) != null;) {
    updateValueSize(rr);
  }
  s.close();
}
项目:hbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  if (this.testScanner == null) {
    Scan scan = new Scan().withStartRow(format(opts.startRow)).setCaching(opts.caching)
        .setCacheBlocks(opts.cacheBlocks).setAsyncPrefetch(opts.asyncPrefetch)
        .setReadType(opts.scanReadType);
    if (opts.addColumns) {
      scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
    } else {
      scan.addFamily(FAMILY_NAME);
    }
    if (opts.filterAll) {
      scan.setFilter(new FilterAllFilter());
    }
    this.testScanner = table.getScanner(scan);
  }
  Result r = testScanner.next();
  updateValueSize(r);
}
项目:hbase    文件:PerformanceEvaluation.java   
protected Scan constructScan(byte[] valuePrefix) throws IOException {
  FilterList list = new FilterList();
  Filter filter = new SingleColumnValueFilter(
      FAMILY_NAME, COLUMN_ZERO, CompareOperator.EQUAL,
      new BinaryComparator(valuePrefix)
  );
  list.addFilter(filter);
  if(opts.filterAll) {
    list.addFilter(new FilterAllFilter());
  }
  Scan scan = new Scan().setCaching(opts.caching).setCacheBlocks(opts.cacheBlocks)
      .setAsyncPrefetch(opts.asyncPrefetch).setReadType(opts.scanReadType);
  if (opts.addColumns) {
    scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  } else {
    scan.addFamily(FAMILY_NAME);
  }
  scan.setFilter(list);
  return scan;
}
项目:PyroDB    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Pair<byte[], byte[]> startAndStopRow = getStartAndStopRow();
  Scan scan = new Scan(startAndStopRow.getFirst(), startAndStopRow.getSecond());
  if (opts.filterAll) {
    scan.setFilter(new FilterAllFilter());
  }
  scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  ResultScanner s = this.table.getScanner(scan);
  int count = 0;
  while (s.next() != null) {
    count++;
  }

  if (i % 100 == 0) {
    LOG.info(String.format("Scan for key range %s - %s returned %s rows",
        Bytes.toString(startAndStopRow.getFirst()),
        Bytes.toString(startAndStopRow.getSecond()), count));
  }

  s.close();
}
项目:PyroDB    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Get get = new Get(getRandomRow(this.rand, opts.totalRows));
  get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  if (LOG.isTraceEnabled()) LOG.trace(get.toString());
  if (opts.multiGet > 0) {
    this.gets.add(get);
    if (this.gets.size() == opts.multiGet) {
      this.table.get(this.gets);
      this.gets.clear();
    }
  } else {
    this.table.get(get);
  }
}
项目:ditb    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Pair<byte[], byte[]> startAndStopRow = getStartAndStopRow();
  Scan scan = new Scan(startAndStopRow.getFirst(), startAndStopRow.getSecond());
  scan.setCaching(opts.caching);
  if (opts.filterAll) {
    scan.setFilter(new FilterAllFilter());
  }
  if (opts.addColumns) {
    scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  } else {
    scan.addFamily(FAMILY_NAME);
  }
  Result r = null;
  int count = 0;
  ResultScanner s = this.table.getScanner(scan);
  for (; (r = s.next()) != null;) {
    updateValueSize(r);
    count++;
  }
  if (i % 100 == 0) {
    LOG.info(String.format("Scan for key range %s - %s returned %s rows",
        Bytes.toString(startAndStopRow.getFirst()),
        Bytes.toString(startAndStopRow.getSecond()), count));
  }

  s.close();
}
项目:ditb    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException, InterruptedException {
  if (opts.randomSleep > 0) {
    Thread.sleep(rd.nextInt(opts.randomSleep));
  }
  Get get = new Get(getRandomRow(this.rand, opts.totalRows));
  if (opts.addColumns) {
    get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  } else {
    get.addFamily(FAMILY_NAME);
  }
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  get.setConsistency(consistency);
  if (LOG.isTraceEnabled()) LOG.trace(get.toString());
  if (opts.multiGet > 0) {
    this.gets.add(get);
    if (this.gets.size() == opts.multiGet) {
      Result [] rs = this.table.get(this.gets);
      updateValueSize(rs);
      this.gets.clear();
    }
  } else {
    updateValueSize(this.table.get(get));
  }
}
项目:ditb    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Get get = new Get(format(i));
  if (opts.addColumns) {
    get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  }
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  updateValueSize(table.get(get));
}
项目:pbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  if (this.testScanner == null) {
    Scan scan = new Scan(format(opts.startRow));
    scan.setCaching(30);
    scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
    if (opts.filterAll) {
      scan.setFilter(new FilterAllFilter());
    }
   this.testScanner = table.getScanner(scan);
  }
  Result r = testScanner.next();
  updateValueSize(r);
}
项目:pbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Get get = new Get(format(i));
  get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  updateValueSize(table.get(get));
}
项目:pbase    文件:PerformanceEvaluation.java   
protected Scan constructScan(byte[] valuePrefix) throws IOException {
  FilterList list = new FilterList();
  Filter filter = new SingleColumnValueFilter(
      FAMILY_NAME, QUALIFIER_NAME, CompareFilter.CompareOp.EQUAL,
      new BinaryComparator(valuePrefix)
  );
  list.addFilter(filter);
  if(opts.filterAll) {
    list.addFilter(new FilterAllFilter());
  }
  Scan scan = new Scan();
  scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  scan.setFilter(list);
  return scan;
}
项目:HIndex    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Scan scan = new Scan(getRandomRow(this.rand, opts.totalRows));
  FilterList list = new FilterList();
  scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  if (opts.filterAll) {
    list.addFilter(new FilterAllFilter());
  }
  list.addFilter(new WhileMatchFilter(new PageFilter(120)));
  scan.setFilter(list);
  ResultScanner s = this.table.getScanner(scan);
  for (Result rr; (rr = s.next()) != null;) ;
  s.close();
}
项目:HIndex    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  if (this.testScanner == null) {
    Scan scan = new Scan(format(opts.startRow));
    scan.setCaching(30);
    scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
    if (opts.filterAll) {
      scan.setFilter(new FilterAllFilter());
    }
   this.testScanner = table.getScanner(scan);
  }
  testScanner.next();
}
项目:HIndex    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Get get = new Get(format(i));
  get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  table.get(get);
}
项目:HIndex    文件:PerformanceEvaluation.java   
protected Scan constructScan(byte[] valuePrefix) throws IOException {
  FilterList list = new FilterList();
  Filter filter = new SingleColumnValueFilter(
      FAMILY_NAME, QUALIFIER_NAME, CompareFilter.CompareOp.EQUAL,
      new BinaryComparator(valuePrefix)
  );
  list.addFilter(filter);
  if(opts.filterAll) {
    list.addFilter(new FilterAllFilter());
  }
  Scan scan = new Scan();
  scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  scan.setFilter(list);
  return scan;
}
项目:hbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException, InterruptedException {
  if (opts.randomSleep > 0) {
    Thread.sleep(rd.nextInt(opts.randomSleep));
  }
  Get get = new Get(getRandomRow(this.rand, opts.totalRows));
  if (opts.addColumns) {
    get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  } else {
    get.addFamily(FAMILY_NAME);
  }
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  get.setConsistency(consistency);
  if (LOG.isTraceEnabled()) LOG.trace(get.toString());
  try {
    if (opts.multiGet > 0) {
      this.gets.add(get);
      if (this.gets.size() == opts.multiGet) {
        Result[] rs =
            this.table.get(this.gets).stream().map(f -> propagate(f::get)).toArray(Result[]::new);
        updateValueSize(rs);
        this.gets.clear();
      }
    } else {
      updateValueSize(this.table.get(get).get());
    }
  } catch (ExecutionException e) {
    throw new IOException(e);
  }
}
项目:hbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException, InterruptedException {
  Get get = new Get(format(i));
  if (opts.addColumns) {
    get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  }
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  try {
    updateValueSize(table.get(get).get());
  } catch (ExecutionException e) {
    throw new IOException(e);
  }
}
项目:hbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Pair<byte[], byte[]> startAndStopRow = getStartAndStopRow();
  Scan scan = new Scan().withStartRow(startAndStopRow.getFirst())
      .withStopRow(startAndStopRow.getSecond()).setCaching(opts.caching)
      .setCacheBlocks(opts.cacheBlocks).setAsyncPrefetch(opts.asyncPrefetch)
      .setReadType(opts.scanReadType);
  if (opts.filterAll) {
    scan.setFilter(new FilterAllFilter());
  }
  if (opts.addColumns) {
    scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  } else {
    scan.addFamily(FAMILY_NAME);
  }
  Result r = null;
  int count = 0;
  ResultScanner s = this.table.getScanner(scan);
  for (; (r = s.next()) != null;) {
    updateValueSize(r);
    count++;
  }
  if (i % 100 == 0) {
    LOG.info(String.format("Scan for key range %s - %s returned %s rows",
        Bytes.toString(startAndStopRow.getFirst()),
        Bytes.toString(startAndStopRow.getSecond()), count));
  }

  s.close();
}
项目:hbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException, InterruptedException {
  if (opts.randomSleep > 0) {
    Thread.sleep(rd.nextInt(opts.randomSleep));
  }
  Get get = new Get(getRandomRow(this.rand, opts.totalRows));
  if (opts.addColumns) {
    get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  } else {
    get.addFamily(FAMILY_NAME);
  }
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  get.setConsistency(consistency);
  if (LOG.isTraceEnabled()) LOG.trace(get.toString());
  if (opts.multiGet > 0) {
    this.gets.add(get);
    if (this.gets.size() == opts.multiGet) {
      Result [] rs = this.table.get(this.gets);
      updateValueSize(rs);
      this.gets.clear();
    }
  } else {
    updateValueSize(this.table.get(get));
  }
}
项目:hbase    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Get get = new Get(format(i));
  if (opts.addColumns) {
    get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  }
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  updateValueSize(table.get(get));
}
项目:PyroDB    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Scan scan = new Scan(getRandomRow(this.rand, opts.totalRows));
  FilterList list = new FilterList();
  scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  if (opts.filterAll) {
    list.addFilter(new FilterAllFilter());
  }
  list.addFilter(new WhileMatchFilter(new PageFilter(120)));
  scan.setFilter(list);
  ResultScanner s = this.table.getScanner(scan);
  for (Result rr; (rr = s.next()) != null;) ;
  s.close();
}
项目:PyroDB    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  if (this.testScanner == null) {
    Scan scan = new Scan(format(opts.startRow));
    scan.setCaching(30);
    scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
    if (opts.filterAll) {
      scan.setFilter(new FilterAllFilter());
    }
   this.testScanner = table.getScanner(scan);
  }
  testScanner.next();
}
项目:PyroDB    文件:PerformanceEvaluation.java   
@Override
void testRow(final int i) throws IOException {
  Get get = new Get(format(i));
  get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  if (opts.filterAll) {
    get.setFilter(new FilterAllFilter());
  }
  table.get(get);
}
项目:PyroDB    文件:PerformanceEvaluation.java   
protected Scan constructScan(byte[] valuePrefix) throws IOException {
  FilterList list = new FilterList();
  Filter filter = new SingleColumnValueFilter(
      FAMILY_NAME, QUALIFIER_NAME, CompareFilter.CompareOp.EQUAL,
      new BinaryComparator(valuePrefix)
  );
  list.addFilter(filter);
  if(opts.filterAll) {
    list.addFilter(new FilterAllFilter());
  }
  Scan scan = new Scan();
  scan.addColumn(FAMILY_NAME, QUALIFIER_NAME);
  scan.setFilter(list);
  return scan;
}