private void createCellHints() {
    if (prefix == null) {
      return;
    }
    // On reversed scan hint should be the prefix with last byte incremented
    byte[] reversedHintBytes = PrivateCellUtil.increaseLastNonMaxByte(this.prefix);
    this.reversedNextCellHint =
      PrivateCellUtil.createFirstOnRow(reversedHintBytes, 0, (short) reversedHintBytes.length);
    // On forward scan hint should be the prefix
    this.forwardNextCellHint = PrivateCellUtil.createFirstOnRow(prefix, 0, (short) prefix.length);
  }
Pass results that have same row prefix.
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java