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
ConstructorsModifierConstructorDescriptionSingleColumnValueExcludeFilter(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.protectedSingleColumnValueExcludeFilter(byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator, boolean filterIfMissing, boolean latestVersionOnly) Constructor for protobuf deserialization only. -
Method Summary
Modifier and TypeMethodDescription(package private) booleanReturns true if and only if the fields of the filter that are serialized are equal to the corresponding fields in other.static FiltercreateFilterFromArguments(ArrayList<byte[]> filterArguments) booleanvoidfilterRowCells(List<Cell> kvs) Filters that never filter by modifying the returned List of Cells can inherit this implementation that does nothing.booleanFilters that never filter by modifying the returned List of Cells can inherit this implementation that does nothing.inthashCode()parseFrom(byte[] pbBytes) Parse a serialized representation ofSingleColumnValueExcludeFilterbyte[]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, toStringMethods inherited from class org.apache.hadoop.hbase.filter.FilterBase
filterAllRemaining, getNextCellHint, transformCellMethods 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:FilterBaseFilters 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:
hasFilterRowin classSingleColumnValueFilter- Returns:
- True if this filter actively uses filterRowCells(List) or filterRow().
-
filterRowCells
Description copied from class:FilterBaseFilters 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:
filterRowCellsin classFilterBase- Parameters:
kvs- the list of Cells to be filtered
-
createFilterFromArguments
-
toByteArray
Returns The filter serialized using pb- Overrides:
toByteArrayin 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 serializedSingleColumnValueExcludeFilterinstance- Returns:
- An instance of
SingleColumnValueExcludeFiltermade 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:
areSerializedFieldsEqualin 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:
equalsin classSingleColumnValueFilter
-
hashCode
- Overrides:
hashCodein classSingleColumnValueFilter
-