org.apache.hadoop.hbase.filter
Class FamilyFilter
java.lang.Object
org.apache.hadoop.hbase.filter.Filter
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.CompareFilter
org.apache.hadoop.hbase.filter.FamilyFilter
@InterfaceAudience.Public
@InterfaceStability.Stable
public class FamilyFilter
- extends CompareFilter
This filter is used to filter based on the column family. It takes an
operator (equal, greater, not equal, etc) and a byte [] comparator for the
column family portion of a key.
This filter can be wrapped with WhileMatchFilter
and SkipFilter
to add more control.
Multiple filters can be combined using FilterList
.
If an already known column family is looked for, use Get.addFamily(byte[])
directly rather than a filter.
Fields inherited from class org.apache.hadoop.hbase.filter.Filter |
reversed |
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase |
filterAllRemaining, filterRow, filterRow, filterRowCells, filterRowKey, getNextCellHint, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, transform, transformCell |
FamilyFilter
public FamilyFilter(CompareFilter.CompareOp familyCompareOp,
ByteArrayComparable familyComparator)
- Constructor.
- Parameters:
familyCompareOp
- the compare op for column family matchingfamilyComparator
- the comparator for column family matching
filterKeyValue
public Filter.ReturnCode filterKeyValue(Cell v)
- Description copied from class:
FilterBase
- Filters that dont filter by key value can inherit this implementation that
includes all Cells.
- Overrides:
filterKeyValue
in class FilterBase
- Parameters:
v
- the Cell in question
- Returns:
- code as described below
- See Also:
Filter.ReturnCode
createFilterFromArguments
public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
toByteArray
public byte[] toByteArray()
- Description copied from class:
FilterBase
- Return length 0 byte array for Filters that don't require special serialization
- Overrides:
toByteArray
in class FilterBase
- Returns:
- The filter serialized using pb
parseFrom
public static FamilyFilter parseFrom(byte[] pbBytes)
throws DeserializationException
- Parameters:
pbBytes
- A pb serialized FamilyFilter
instance
- Returns:
- An instance of
FamilyFilter
made from bytes
- Throws:
DeserializationException
- See Also:
toByteArray()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.