public class PageFilter extends FilterBase
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.
Filter.ReturnCode
Constructor and Description |
---|
PageFilter()
Default constructor, filters nothing.
|
PageFilter(long pageSize)
Constructor that takes a maximum page size.
|
Modifier and Type | Method and Description |
---|---|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments) |
boolean |
filterAllRemaining()
Filters that never filter all remaining can inherit this implementation that
never stops the filter early.
|
boolean |
filterRow()
Filters that never filter by rows based on previously gathered state from
FilterBase.filterKeyValue(KeyValue) can inherit this implementation that
never filters a row. |
long |
getPageSize() |
void |
readFields(DataInput in) |
String |
toString()
Return filter's info for debugging and logging purpose.
|
void |
write(DataOutput out) |
filterKeyValue, filterRow, filterRowKey, getNextKeyHint, hasFilterRow, isFamilyEssential, isFamilyEssential, reset, transform
public PageFilter()
public PageFilter(long pageSize)
pageSize
- Maximum result size.public long getPageSize()
public boolean filterAllRemaining()
FilterBase
filterAllRemaining
in interface Filter
filterAllRemaining
in class FilterBase
public boolean filterRow()
FilterBase
FilterBase.filterKeyValue(KeyValue)
can inherit this implementation that
never filters a row.filterRow
in interface Filter
filterRow
in class FilterBase
public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
public void readFields(DataInput in) throws IOException
IOException
public void write(DataOutput out) throws IOException
IOException
public String toString()
FilterBase
toString
in class FilterBase
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.