|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.filter.PageRowFilter
public class PageRowFilter
Implementation of RowFilterInterface that limits results to a specific page size. It terminates scanning once the number of filter-passed results 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.
Constructor Summary | |
---|---|
PageRowFilter()
Default constructor, filters nothing. |
|
PageRowFilter(long pageSize)
Constructor that takes a maximum page size. |
Method Summary | |
---|---|
boolean |
filterAllRemaining()
Determines if the filter has decided that all remaining results should be filtered (skipped). |
boolean |
filterColumn(byte[] rowKey,
byte[] colKey,
byte[] data)
Filters on row key, column name, and column value. |
boolean |
filterRow(SortedMap<byte[],Cell> columns)
Filter on the fully assembled row. |
boolean |
filterRowKey(byte[] r)
Filters on just a row key. |
boolean |
processAlways()
Returns whether or not the filter should always be processed in any filtering call. |
void |
readFields(DataInput in)
|
void |
reset()
Resets the state of the filter. |
void |
rowProcessed(boolean filtered,
byte[] rowKey)
Called to let filter know the final decision (to pass or filter) on a given row. |
void |
validate(byte[][] columns)
Validates that this filter applies only to a subset of the given columns. |
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageRowFilter()
public PageRowFilter(long pageSize)
pageSize
- Maximum result size.Method Detail |
---|
public void validate(byte[][] columns)
RowFilterInterface
validate
in interface RowFilterInterface
public void reset()
RowFilterInterface
reset
in interface RowFilterInterface
public void rowProcessed(boolean filtered, byte[] rowKey)
RowFilterInterface
rowProcessed
in interface RowFilterInterface
RowFilterSet
public boolean processAlways()
RowFilterInterface
processAlways
in interface RowFilterInterface
public boolean filterAllRemaining()
RowFilterInterface
filterAllRemaining
in interface RowFilterInterface
public boolean filterRowKey(byte[] r)
RowFilterInterface
filterRowKey
in interface RowFilterInterface
public boolean filterColumn(byte[] rowKey, byte[] colKey, byte[] data)
RowFilterInterface
filterColumn
in interface RowFilterInterface
rowKey
- row key to filter on.colKey
- column name to filter ondata
- column value to filter on
public boolean filterRow(SortedMap<byte[],Cell> columns)
RowFilterInterface
filterRow
in interface RowFilterInterface
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |