blob: 8f08b82bea373d5e561b814eff3c639c881d9a29 [file] [log] [blame]
package org.qcri.rheem.apps.simwords
import org.qcri.rheem.core.function.FunctionDescriptor.SerializableFunction
import scala.util.Random
/**
* Attaches [[String]]s with a random [[Int]].
*/
class AddIdFunction extends SerializableFunction[String, (String, Int)] {
lazy val random = new Random
override def apply(t: String): (String, Int) = (t, random.nextInt())
}