Yeah, shouldn't this just be mapReduceMap where you map to (rand, V), reduce with TopK on rand, and then map again to drop the random value?