public static ExtendedCell filterKv(Filter filter, ExtendedCell c) throws IOException {
    // apply the filter and skip this kv if the filter doesn't apply
    if (filter != null) {
      Filter.ReturnCode code = filter.filterCell(c);
      if (LOG.isTraceEnabled()) {
        LOG.trace("Filter returned:" + code + " for the cell:" + c);
      }
      // 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 c;
  }
Attempt to filter out the keyvalue
@param c {@link Cell} on which to apply the filter
@return <tt>null</tt> if the key should not be written, otherwise returns the original
        {@link Cell}
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java