public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments) {
    Preconditions.checkArgument((filterArguments.isEmpty() || filterArguments.size() == 1),
      "Expected: 0 or 1 but got: %s", filterArguments.size());
    KeyOnlyFilter filter = new KeyOnlyFilter();
    if (filterArguments.size() == 1) {
      filter.lenAsVal = ParseFilter.convertByteArrayToBoolean(filterArguments.get(0));
    }
    return filter;
  }
A filter that will only return the key component of each KV (the value will be rewritten as
empty).
<p>
This filter can be used to grab all of the keys without having to also grab the values.
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/KeyOnlyFilter.java