org.apache.hadoop.hbase.filter
Class InclusiveStopFilter

java.lang.Object
  extended by org.apache.hadoop.hbase.filter.Filter
      extended by org.apache.hadoop.hbase.filter.FilterBase
          extended by org.apache.hadoop.hbase.filter.InclusiveStopFilter

@InterfaceAudience.Public
@InterfaceStability.Stable
public class InclusiveStopFilter
extends org.apache.hadoop.hbase.filter.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 class org.apache.hadoop.hbase.filter.Filter
Filter.ReturnCode
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.filter.Filter
reversed
 
Constructor Summary
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(Cell v)
          Filters that dont filter by key value can inherit this implementation that includes all Cells.
 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()
           
static InclusiveStopFilter parseFrom(byte[] pbBytes)
           
 byte[] toByteArray()
          Return length 0 byte array for Filters that don't require special serialization
 String toString()
          Return filter's info for debugging and logging purpose.
 
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase
filterRow, filterRow, filterRowCells, getNextCellHint, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, transform, transformCell
 
Methods inherited from class org.apache.hadoop.hbase.filter.Filter
isReversed, setReversed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InclusiveStopFilter

public InclusiveStopFilter(byte[] stopRowKey)
Method Detail

getStopRowKey

public byte[] getStopRowKey()

filterKeyValue

public Filter.ReturnCode filterKeyValue(Cell v)
Description copied from class: org.apache.hadoop.hbase.filter.FilterBase
Filters that dont filter by key value can inherit this implementation that includes all Cells.

Overrides:
filterKeyValue in class org.apache.hadoop.hbase.filter.FilterBase
Parameters:
v - the Cell 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: org.apache.hadoop.hbase.filter.FilterBase
Filters that do not filter by row key can inherit this implementation that never filters anything. (ie: returns false).

Overrides:
filterRowKey in class org.apache.hadoop.hbase.filter.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: org.apache.hadoop.hbase.filter.FilterBase
Filters that never filter all remaining can inherit this implementation that never stops the filter early.

Overrides:
filterAllRemaining in class org.apache.hadoop.hbase.filter.FilterBase
Returns:
true to end scan, false to continue.

createFilterFromArguments

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

toByteArray

public byte[] toByteArray()
Description copied from class: org.apache.hadoop.hbase.filter.FilterBase
Return length 0 byte array for Filters that don't require special serialization

Overrides:
toByteArray in class org.apache.hadoop.hbase.filter.FilterBase
Returns:
The filter serialized using pb

parseFrom

public static InclusiveStopFilter parseFrom(byte[] pbBytes)
                                     throws org.apache.hadoop.hbase.exceptions.DeserializationException
Parameters:
pbBytes - A pb serialized InclusiveStopFilter instance
Returns:
An instance of InclusiveStopFilter made from bytes
Throws:
org.apache.hadoop.hbase.exceptions.DeserializationException
See Also:
toByteArray()

toString

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

Overrides:
toString in class org.apache.hadoop.hbase.filter.FilterBase


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.