public void setup(final BenchmarkParams b) throws IOException { keySize = intKey ? BYTES : STRING_KEY_LENGTH; crc = new CRC32(); final IntHashSet set = new IntHashSet(num); keys = new int[num]; for (int i = 0; i < num; i++) { if (sequential) { keys[i] = i; } else { while (true) { int candidateKey = RND.nextInt(); if (candidateKey < 0) { candidateKey *= -1; } if (!set.contains(candidateKey)) { set.add(candidateKey); keys[i] = candidateKey; break; } } } } rmdir(TMP_BENCH); tmp = create(b, ""); compact = create(b, "-compacted"); }