public static Cell filterKv ( Filter filter , Cell kv ) throws IOException { // apply the filter and skip this kv if the filter doesn't apply if ( filter != null ) { Filter . ReturnCode code = filter . filterKeyValue ( kv ) ; if ( LOG . isTraceEnabled ( ) ) { LOG . trace ( "Filter returned:" + code + " for the key value:" + kv ) ; } // if its not an accept type, then skip this kv if ( ! ( code . equals ( Filter . ReturnCode . INCLUDE ) || code . equals ( Filter . ReturnCode . INCLUDE_AND_NEXT_COL ) ) ) { return null ; } } return kv ; }
Attempt to filter out the keyvalue