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
 Filter.ReturnCode filterKeyValue(KeyValue kv)
          Filters that dont filter by key value can inherit this implementation that includes all KeyValues.
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase
filterAllRemaining, filterRow, filterRow, filterRowKey, getNextKeyHint, hasFilterRow, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyOnlyFilter

public KeyOnlyFilter()

KeyOnlyFilter

public KeyOnlyFilter(boolean lenAsVal)
Method Detail

filterKeyValue

public Filter.ReturnCode filterKeyValue(KeyValue kv)
Description copied from class: FilterBase
Filters that dont filter by key value can inherit this implementation that includes all KeyValues.

Specified by:
filterKeyValue in interface Filter
Overrides:
filterKeyValue in class FilterBase
Parameters:
kv - the KeyValue in question
Returns:
code as described below
See Also:
Filter.ReturnCode

write

public void write(DataOutput out)
           throws IOException
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Throws:
IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.