org.apache.hadoop.hbase.filter
Class PrefixFilter
java.lang.Object
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.PrefixFilter
- All Implemented Interfaces:
- Filter, org.apache.hadoop.io.Writable
public class PrefixFilter
- extends FilterBase
Pass results that have same row prefix.
Method Summary |
boolean |
filterAllRemaining()
Filters that never filter all remaining can inherit this implementation that
never stops the filter early. |
boolean |
filterRowKey(byte[] buffer,
int offset,
int length)
Filters that do not filter by row key can inherit this implementation that
never filters anything. |
byte[] |
getPrefix()
|
void |
readFields(DataInput in)
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prefix
protected byte[] prefix
passedPrefix
protected boolean passedPrefix
PrefixFilter
public PrefixFilter(byte[] prefix)
PrefixFilter
public PrefixFilter()
getPrefix
public byte[] getPrefix()
filterRowKey
public boolean filterRowKey(byte[] buffer,
int offset,
int length)
- Description copied from class:
FilterBase
- Filters that do not filter by row key can inherit this implementation that
never filters anything. (ie: returns false).
- Specified by:
filterRowKey
in interface Filter
- Overrides:
filterRowKey
in class FilterBase
- Parameters:
buffer
- buffer containing row keyoffset
- offset into buffer where row key startslength
- length of the row key
- Returns:
- true, remove entire row, false, include the row (maybe).
filterAllRemaining
public boolean filterAllRemaining()
- Description copied from class:
FilterBase
- Filters that never filter all remaining can inherit this implementation that
never stops the filter early.
- Specified by:
filterAllRemaining
in interface Filter
- Overrides:
filterAllRemaining
in class FilterBase
- Returns:
- true to end scan, false to continue.
write
public void write(DataOutput out)
throws IOException
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Throws:
IOException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.