..somewhere, this person's algorithms teacher is pondering about his life choices.
(OK, well, it is maybe using hashes for the per-SST Bloom filter, but that's not what's interesting here. It's maybe also using hashes in the memtable in which case they're using it very inefficiently since the key encoding is not prefix-scan-friendly.)
This quickly solves the problem then you can iterate for performance.
Persisting just about anything in Java is easier than persisting it in Java in RocksDB.
Why not a tree based map instead?
Is it possible for a hash function to maintain a sort relationship to it's input and output?
You could do something similar with a sorted data structure backing the hashmap to get sorted order (a b-tree or something similar).
You could have the hash function preserve order at the cost of it being a very bad hash function. If you had n buckets, then the first 1/n elements in the keyspace would map to bucket 0, then next 1/n elements map to bucket 1, etc.
For sort order you need to sort separately.