@Override
  public ReturnCode filterCell(final Cell c) {
    if (foundKV) return ReturnCode.NEXT_ROW;
    foundKV = true;
    return ReturnCode.INCLUDE;
  }
A filter that will only return the first KV from each row.
<p>
This filter can be used to more efficiently perform row count operations.
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.java