org.apache.hadoop.hbase.filter
Class FirstKeyValueMatchingQualifiersFilter
java.lang.Object
org.apache.hadoop.hbase.filter.Filter
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter
org.apache.hadoop.hbase.filter.FirstKeyValueMatchingQualifiersFilter
@InterfaceAudience.Public
@InterfaceStability.Stable
public class FirstKeyValueMatchingQualifiersFilter
- extends FirstKeyOnlyFilter
The filter looks for the given columns in KeyValue. Once there is a match for
any one of the columns, it returns ReturnCode.NEXT_ROW for remaining
KeyValues in the row.
Note : It may emit KVs which do not have the given columns in them, if
these KVs happen to occur before a KV which does have a match. Given this
caveat, this filter is only useful for special cases
like RowCounter
.
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, toString, transform, transformCell |
FirstKeyValueMatchingQualifiersFilter
public FirstKeyValueMatchingQualifiersFilter(Set<byte[]> qualifiers)
- Constructor which takes a set of columns. As soon as first KeyValue
matching any of these columns is found, filter moves to next row.
- Parameters:
qualifiers
- the set of columns to me matched.
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 FirstKeyOnlyFilter
- Parameters:
v
- the Cell in question
- Returns:
- code as described below
- See Also:
Filter.ReturnCode
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 FirstKeyOnlyFilter
- Returns:
- The filter serialized using pb
parseFrom
public static FirstKeyValueMatchingQualifiersFilter parseFrom(byte[] pbBytes)
throws DeserializationException
- Parameters:
pbBytes
- A pb serialized FirstKeyValueMatchingQualifiersFilter
instance
- Returns:
- An instance of
FirstKeyValueMatchingQualifiersFilter
made from bytes
- Throws:
DeserializationException
- See Also:
toByteArray()
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.