org.apache.hadoop.hbase.filter
Class KeyOnlyFilter
java.lang.Object
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.KeyOnlyFilter
- All Implemented Interfaces:
- Filter, org.apache.hadoop.io.Writable
public class KeyOnlyFilter
- extends 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.
KeyOnlyFilter
public KeyOnlyFilter()
KeyOnlyFilter
public KeyOnlyFilter(boolean lenAsVal)
transform
public KeyValue transform(KeyValue kv)
- Description copied from class:
FilterBase
- By default no transformation takes place
- Specified by:
transform
in interface Filter
- Overrides:
transform
in class 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.
createFilterFromArguments
public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
write
public void write(DataOutput out)
throws IOException
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Throws:
IOException
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.