presto-kafka/src/main/java/io/prestosql/plugin/kafka/KafkaSplitManager.java/KafkaSplitManager/selectRandom
class KafkaSplitManager:    private static <T> T selectRandom(Iterable<T> iterable)
    {
        List<T> list = ImmutableList.copyOf(iterable);
        return list.get(ThreadLocalRandom.current().nextInt(list.size()));
    }