private List<Integer> shuffleProcWriteSequence() {
    List<Integer> procStatesSequence = new ArrayList<>();
    Set<Integer> toBeDeletedProcs = new HashSet<>();
    // Add n + 1 entries of the proc id for insert + updates. If proc is chosen for delete, add
    // extra entry which is marked -ve in the loop after shuffle.
    for (int procId = 1; procId <= numProcs; ++procId) {
      procStatesSequence.addAll(Collections.nCopies(updatesPerProc + 1, procId));
      if (ThreadLocalRandom.current().nextFloat() < deleteProcsFraction) {
        procStatesSequence.add(procId);
        toBeDeletedProcs.add(procId);
      }
    }
    Collections.shuffle(procStatesSequence);
    // Mark last occurrences of proc ids in toBeDeletedProcs with -ve to denote it's a delete state.
    for (int i = procStatesSequence.size() - 1; i >= 0; --i) {
      int procId = procStatesSequence.get(i);
      if (toBeDeletedProcs.contains(procId)) {
        procStatesSequence.set(i, -1 * procId);
        toBeDeletedProcs.remove(procId);
      }
    }
    return procStatesSequence;
  }
@return a list of shuffled integers which represent state of proc id. First occurrence of a
        number denotes insert state, consecutive occurrences denote update states, and -ve
        value denotes delete state.
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALLoaderPerformanceEvaluation.java