public void setUpPerIteration()

in src/main/java/org/apache/flink/state/benchmark/ListStateBenchmark.java [76:89]


    public void setUpPerIteration() throws Exception {
        for (int i = 0; i < setupKeyCount; ++i) {
            keyedStateBackend.setCurrentKey((long) i);
            listState.add(random.nextLong());
        }
        // make sure only one sst file left, so all get invocation will access this single file,
        // to prevent the spike caused by different key distribution in multiple sst files,
        // the more access to the older sst file, the lower throughput will be.
        if (keyedStateBackend instanceof RocksDBKeyedStateBackend) {
            RocksDBKeyedStateBackend<Long> rocksDBKeyedStateBackend =
                    (RocksDBKeyedStateBackend<Long>) keyedStateBackend;
            compactState(rocksDBKeyedStateBackend, STATE_DESC);
        }
    }