code: 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;
    }
docs: Attempt to filter out the keyvalue
  
  @param kv {@link org.apache.hadoop.hbase.KeyValue} on which to apply the filter
  @return <tt>null</tt> if the key should not be written, otherwise returns the original
  {@link org.apache.hadoop.hbase.KeyValue}
  @param filter a {@link org.apache.hadoop.hbase.filter.Filter} object.
  @throws java.io.IOException if any.