Demo entry 6634937

scala

   

Submitted by anonymous on Aug 15, 2017 at 11:10
Language: Scala. Code size: 175 Bytes.

val hostParitioner = new HostParitioner(ints)
   		val rdd4 = rdd3.partitionBy(hostParitioner).mapPartitions(it => {
 It.toList.sortBy(_._2._2).reverse.take(2).iterator })

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).