org.apache.hadoop.hbase.filter
Class KeyOnlyFilter
java.lang.Object
org.apache.hadoop.hbase.filter.Filter
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.KeyOnlyFilter
@InterfaceAudience.Public
@InterfaceStability.Stable
public class KeyOnlyFilter
- extends org.apache.hadoop.hbase.filter.FilterBase
A filter that will only return the key component of each KV (the value will
be rewritten as empty).
This filter can be used to grab all of the keys without having to also grab
the values.
Fields inherited from class org.apache.hadoop.hbase.filter.Filter |
reversed |
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase |
filterAllRemaining, filterKeyValue, filterRow, filterRow, filterRowCells, filterRowKey, getNextCellHint, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, toString, transform |
KeyOnlyFilter
public KeyOnlyFilter()
KeyOnlyFilter
public KeyOnlyFilter(boolean lenAsVal)
transformCell
public Cell transformCell(Cell kv)
- Description copied from class:
org.apache.hadoop.hbase.filter.FilterBase
- By default no transformation takes place
- Overrides:
transformCell
in class org.apache.hadoop.hbase.filter.FilterBase
- Parameters:
kv
- the KeyValue in question
- Returns:
- the changed KeyValue
- See Also:
The transformed KeyValue is what is eventually returned to the client. Most filters will
return the passed KeyValue unchanged.
,
for an example of a
transformation.
Concrete implementers can signal a failure condition in their code by throwing an
{@link IOException}.
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 KeyOnlyFilter parseFrom(byte[] pbBytes)
throws org.apache.hadoop.hbase.exceptions.DeserializationException
- Parameters:
pbBytes
- A pb serialized KeyOnlyFilter
instance
- Returns:
- An instance of
KeyOnlyFilter
made from bytes
- Throws:
org.apache.hadoop.hbase.exceptions.DeserializationException
- See Also:
toByteArray()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.