Search in sources :

Example 1 with FilterAllFilter

use of org.apache.hadoop.hbase.filter.FilterAllFilter in project hbase by apache.

the class TestRegionObserverInterface method testHBASE14489.

@Test(timeout = 300000)
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();
}
Also used : TableName(org.apache.hadoop.hbase.TableName) Table(org.apache.hadoop.hbase.client.Table) ResultScanner(org.apache.hadoop.hbase.client.ResultScanner) FilterAllFilter(org.apache.hadoop.hbase.filter.FilterAllFilter) Scan(org.apache.hadoop.hbase.client.Scan) Put(org.apache.hadoop.hbase.client.Put) Result(org.apache.hadoop.hbase.client.Result) Test(org.junit.Test)

Aggregations

TableName (org.apache.hadoop.hbase.TableName)1 Put (org.apache.hadoop.hbase.client.Put)1 Result (org.apache.hadoop.hbase.client.Result)1 ResultScanner (org.apache.hadoop.hbase.client.ResultScanner)1 Scan (org.apache.hadoop.hbase.client.Scan)1 Table (org.apache.hadoop.hbase.client.Table)1 FilterAllFilter (org.apache.hadoop.hbase.filter.FilterAllFilter)1 Test (org.junit.Test)1