scala集合转化为DS/DF case class TestPerson(name: String, age: Long, salary: Double) val tom = TestPerson(,35.5) val sam = TestPerson(,40.5) val PersonList = mutable.MutableList[TestPerson]() PersonList += tom PersonList += sam val personDS = PersonList.to
转自:http://www.cnblogs.com/canyangfeixue/p/7227998.html 对于威胁检测算法使用神经网络训练有用!!!TODO待实验 /** * Created by lkl on 2017/7/21. */ //import com.ibm.spark.exercise.util.LogUtils //import com.ibm.spark.exercise.util.LogUtils import org.apache.spark.ml.Pipeline
object ScalaApp { def main(args: Array[String]): Unit = { var conf = new SparkConf() conf.setMaster("local") var sc = new SparkContext(conf) val lines: RDD[String] = sc.textFile("./words.txt") lines.flatMap(line=>line.split()).reduc