org.apache.hadoop.hbase.filter
Class KeyOnlyFilter

java.lang.Object
  extended by org.apache.hadoop.hbase.filter.FilterBase
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.filter.Filter
Filter.ReturnCode
 
Constructor Summary
KeyOnlyFilter()
           
KeyOnlyFilter(boolean lenAsVal)
           
 
Method Summary
static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
           
 void readFields(DataInput in)
           
 KeyValue transform(KeyValue kv)
          By default no transformation takes place
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase
filterAllRemaining, filterKeyValue, filterRow, filterRow, filterRowKey, getNextKeyHint, hasFilterRow, reset, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyOnlyFilter

public KeyOnlyFilter()

KeyOnlyFilter

public KeyOnlyFilter(boolean lenAsVal)
Method Detail

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.