I want to do some modifications on the StreamingKMeans algorithm provided in Spark Streaming, so I created a project containing the necessary files but unfortunately I can not find the mapValues function in the DStream class !
def predictOnValues[K: ClassTag](data: DStream[(K, Vector)]): DStream[(K, Int)] = {
assertInitialized()
data.mapValues(model.predict) //ERROR here !!!
}
Could someone tell me where can I find the mapValues function ?! thanks.