Class KeySamplingFilter


  • @Public
    @Stable
    public class KeySamplingFilter
    extends org.apache.hadoop.hbase.filter.FilterBase
    A filter that will only return the first KV from each row.

    This filter can be used to more efficiently perform row count operations.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.hadoop.hbase.filter.Filter

        org.apache.hadoop.hbase.filter.Filter.ReturnCode
    • Field Summary

      • Fields inherited from class org.apache.hadoop.hbase.filter.Filter

        reversed
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.hadoop.hbase.filter.Filter createFilterFromArguments​(java.util.ArrayList<byte[]> filterArguments)  
      org.apache.hadoop.hbase.filter.Filter.ReturnCode filterKeyValue​(org.apache.hadoop.hbase.Cell v)  
      static KeySamplingFilter parseFrom​(byte[] pbBytes)  
      • Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase

        filterAllRemaining, filterRow, filterRowCells, filterRowKey, getNextCellHint, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, toByteArray, toString, transform, transformCell
      • Methods inherited from class org.apache.hadoop.hbase.filter.Filter

        isReversed, setReversed
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • KeySamplingFilter

        public KeySamplingFilter()
    • Method Detail

      • createFilterFromArguments

        public static org.apache.hadoop.hbase.filter.Filter createFilterFromArguments​(java.util.ArrayList<byte[]> filterArguments)
      • parseFrom

        public static KeySamplingFilter parseFrom​(byte[] pbBytes)
                                           throws org.apache.hadoop.hbase.exceptions.DeserializationException
        Parameters:
        pbBytes - A pb serialized FirstKeyOnlyFilter instance
        Returns:
        An instance of FirstKeyOnlyFilter made from bytes
        Throws:
        org.apache.hadoop.hbase.exceptions.DeserializationException
        See Also:
        FilterBase.toByteArray()
      • filterKeyValue

        public org.apache.hadoop.hbase.filter.Filter.ReturnCode filterKeyValue​(org.apache.hadoop.hbase.Cell v)
                                                                        throws java.io.IOException
        Specified by:
        filterKeyValue in class org.apache.hadoop.hbase.filter.Filter
        Throws:
        java.io.IOException