org.apache.hadoop.hbase.filter
Class InclusiveStopFilter

java.lang.Object
  extended by org.apache.hadoop.hbase.filter.FilterBase
      extended by org.apache.hadoop.hbase.filter.InclusiveStopFilter
All Implemented Interfaces:
Filter, org.apache.hadoop.io.Writable

public class InclusiveStopFilter
extends FilterBase

A Filter that stops after the given row. There is no "RowStopFilter" because the Scan spec allows you to specify a stop row. Use this filter to include the stop row, eg: [A,Z].


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.filter.Filter
Filter.ReturnCode
 
Constructor Summary
InclusiveStopFilter()
           
InclusiveStopFilter(byte[] stopRowKey)
           
 
Method Summary
static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
           
 boolean filterAllRemaining()
          Filters that never filter all remaining can inherit this implementation that never stops the filter early.
 Filter.ReturnCode filterKeyValue(KeyValue v)
          Filters that dont filter by key value can inherit this implementation that includes all KeyValues.
 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[] getStopRowKey()
           
 void readFields(DataInput in)
           
 String toString()
          Return filter's info for debugging and logging purpose.
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase
filterRow, filterRow, getNextKeyHint, hasFilterRow, isFamilyEssential, isFamilyEssential, reset, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InclusiveStopFilter

public InclusiveStopFilter()

InclusiveStopFilter

public InclusiveStopFilter(byte[] stopRowKey)
Method Detail

getStopRowKey

public byte[] getStopRowKey()

filterKeyValue

public Filter.ReturnCode filterKeyValue(KeyValue v)
Description copied from class: FilterBase
Filters that dont filter by key value can inherit this implementation that includes all KeyValues.

Specified by:
filterKeyValue in interface Filter
Overrides:
filterKeyValue in class FilterBase
Parameters:
v - the KeyValue in question
Returns:
code as described below
See Also:
Filter.ReturnCode

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 key
offset - offset into buffer where row key starts
length - 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.

createFilterFromArguments

public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)

write

public void write(DataOutput out)
           throws IOException
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Throws:
IOException

toString

public String toString()
Description copied from class: FilterBase
Return filter's info for debugging and logging purpose.

Overrides:
toString in class FilterBase


Copyright © 2015 The Apache Software Foundation. All Rights Reserved.