@Override
  public boolean filterRowKey(Cell firstRowCell) {
    if (chance < 0) {
      // with a zero chance, the rows is always excluded
      filterOutRow = true;
    } else if (chance > 1) {
      // always included
      filterOutRow = false;
    } else {
      // roll the dice
      filterOutRow = !(ThreadLocalRandom.current().nextFloat() < chance);
    }
    return filterOutRow;
  }
Set the chance that a row is included.
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/RandomRowFilter.java