Package org.apache.hadoop.hbase.filter
Class SingleColumnValueExcludeFilter
java.lang.Object
org.apache.hadoop.hbase.filter.Filter
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.SingleColumnValueFilter
org.apache.hadoop.hbase.filter.SingleColumnValueExcludeFilter
A
Filter
that checks a single column value, but does not emit the tested column. This
will enable a performance boost over SingleColumnValueFilter
, if the tested column value
is not actually needed as input (besides for the filtering itself).-
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.SingleColumnValueFilter
columnFamily, columnQualifier, comparator, filterIfMissing, foundColumn, latestVersionOnly, matchedColumn, op
-
Constructor Summary
ModifierConstructorDescriptionSingleColumnValueExcludeFilter
(byte[] family, byte[] qualifier, CompareOperator op, byte[] value) Constructor for binary compare of the value of a single column.SingleColumnValueExcludeFilter
(byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator) Constructor for binary compare of the value of a single column.protected
SingleColumnValueExcludeFilter
(byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, boolean filterIfMissing, boolean latestVersionOnly) Constructor for protobuf deserialization only. -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
Returns true if and only if the fields of the filter that are serialized are equal to the corresponding fields in other.static Filter
createFilterFromArguments
(ArrayList<byte[]> filterArguments) boolean
void
filterRowCells
(List<Cell> kvs) Filters that never filter by modifying the returned List of Cells can inherit this implementation that does nothing.boolean
Filters that never filter by modifying the returned List of Cells can inherit this implementation that does nothing.int
hashCode()
parseFrom
(byte[] pbBytes) Parse a serialized representation ofSingleColumnValueExcludeFilter
byte[]
Returns The filter serialized using pbMethods inherited from class org.apache.hadoop.hbase.filter.SingleColumnValueFilter
convert, filterCell, filterRow, filterRowKey, getComparator, getCompareOperator, getFamily, getFilterIfMissing, getLatestVersionOnly, getQualifier, isFamilyEssential, reset, setFilterIfMissing, setLatestVersionOnly, toString
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase
filterAllRemaining, getNextCellHint, transformCell
Methods inherited from class org.apache.hadoop.hbase.filter.Filter
isReversed, setReversed
-
Constructor Details
-
SingleColumnValueExcludeFilter
public SingleColumnValueExcludeFilter(byte[] family, byte[] qualifier, CompareOperator op, byte[] value) Constructor for binary compare of the value of a single column. If the column is found and the condition passes, all columns of the row will be emitted; except for the tested column value. If the column is not found or the condition fails, the row will not be emitted.- Parameters:
family
- name of column familyqualifier
- name of column qualifierop
- operatorvalue
- value to compare column values against
-
SingleColumnValueExcludeFilter
public SingleColumnValueExcludeFilter(byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator) Constructor for binary compare of the value of a single column. If the column is found and the condition passes, all columns of the row will be emitted; except for the tested column value. If the condition fails, the row will not be emitted.Use the filterIfColumnMissing flag to set whether the rest of the columns in a row will be emitted if the specified column to check is not found in the row.
- Parameters:
family
- name of column familyqualifier
- name of column qualifierop
- operatorcomparator
- Comparator to use.
-
SingleColumnValueExcludeFilter
protected SingleColumnValueExcludeFilter(byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, boolean filterIfMissing, boolean latestVersionOnly) Constructor for protobuf deserialization only.
-
-
Method Details
-
hasFilterRow
Description copied from class:FilterBase
Filters that never filter by modifying the returned List of Cells can inherit this implementation that does nothing. Primarily used to check for conflicts with scans(such as scans that do not read a full row at a time).- Overrides:
hasFilterRow
in classSingleColumnValueFilter
- Returns:
- True if this filter actively uses filterRowCells(List) or filterRow().
-
filterRowCells
Description copied from class:FilterBase
Filters that never filter by modifying the returned List of Cells can inherit this implementation that does nothing. Chance to alter the list of Cells to be submitted. Modifications to the list will carry on Concrete implementers can signal a failure condition in their code by throwing anIOException
.- Overrides:
filterRowCells
in classFilterBase
- Parameters:
kvs
- the list of Cells to be filtered
-
createFilterFromArguments
-
toByteArray
Returns The filter serialized using pb- Overrides:
toByteArray
in classSingleColumnValueFilter
- Returns:
- The filter serialized using pb
-
parseFrom
public static SingleColumnValueExcludeFilter parseFrom(byte[] pbBytes) throws DeserializationException Parse a serialized representation ofSingleColumnValueExcludeFilter
- Parameters:
pbBytes
- A pb serializedSingleColumnValueExcludeFilter
instance- Returns:
- An instance of
SingleColumnValueExcludeFilter
made frombytes
- Throws:
DeserializationException
- if an error occurred- See Also:
-
areSerializedFieldsEqual
Returns true if and only if the fields of the filter that are serialized are equal to the corresponding fields in other. Used for testing.- Overrides:
areSerializedFieldsEqual
in classSingleColumnValueFilter
- Returns:
- true if and only if the fields of the filter that are serialized are equal to the corresponding fields in other. Used for testing.
-
equals
- Overrides:
equals
in classSingleColumnValueFilter
-
hashCode
- Overrides:
hashCode
in classSingleColumnValueFilter
-