org.apache.hadoop.hbase.hbql.filter
Class PageFilter
java.lang.Object
org.apache.hadoop.hbase.hbql.filter.PageFilter
- All Implemented Interfaces:
- org.apache.hadoop.hbase.filter.Filter, InstrumentedFilter, org.apache.hadoop.io.Writable
public class PageFilter
- extends Object
- implements InstrumentedFilter
Implementation of Filter interface that limits results to a specific page
size. It terminates scanning once the number of filter-passed rows is >
the given page size.
Note that this filter cannot guarantee that the number of results returned
to a client are <= page size. This is because the filter is applied
separately on different region servers. It does however optimize the scan of
individual HRegions by making sure that the page size is never exceeded
locally.
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.filter.Filter |
org.apache.hadoop.hbase.filter.Filter.ReturnCode |
Constructor Summary |
PageFilter()
Default constructor, filters nothing. |
PageFilter(long pageSize,
org.apache.hadoop.hbase.filter.Filter filter)
Constructor that takes a maximum page size. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PageFilter
public PageFilter()
- Default constructor, filters nothing. Required though for RPC
deserialization.
PageFilter
public PageFilter(long pageSize,
org.apache.hadoop.hbase.filter.Filter filter)
- Constructor that takes a maximum page size.
- Parameters:
pageSize
- Maximum result size.
setVerbose
public void setVerbose(boolean verbose)
- Specified by:
setVerbose
in interface InstrumentedFilter
getVerbose
public boolean getVerbose()
- Specified by:
getVerbose
in interface InstrumentedFilter
reset
public void reset()
- Specified by:
reset
in interface org.apache.hadoop.hbase.filter.Filter
filterAllRemaining
public boolean filterAllRemaining()
- Specified by:
filterAllRemaining
in interface org.apache.hadoop.hbase.filter.Filter
filterRowKey
public boolean filterRowKey(byte[] rowKey,
int offset,
int length)
- Specified by:
filterRowKey
in interface org.apache.hadoop.hbase.filter.Filter
filterKeyValue
public org.apache.hadoop.hbase.filter.Filter.ReturnCode filterKeyValue(org.apache.hadoop.hbase.KeyValue v)
- Specified by:
filterKeyValue
in interface org.apache.hadoop.hbase.filter.Filter
filterRow
public boolean filterRow()
- Specified by:
filterRow
in interface org.apache.hadoop.hbase.filter.Filter
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
Copyright © 2010. All Rights Reserved.