spark Transformations,Actions

val result = textFile.flatMap(line => line.split("\\s+"))

        .map(word => (word, 1)).reduceByKey(_ + _)

猜你喜欢

转载自228298566.iteye.com/blog/2051734