spark
spark
runing_an_min
这个作者很懒,什么都没留下…
展开
-
scala+spark: 创建RDD时,显示类型不匹配,Type mismatch。
代码如下 val data:scala.Seq[(Long, (String, String))] = Seq( (3L, ("rxin", "student")), (7L, ("jgozal", "postdoc")), (5L, ("franklin", "prof")), (2L, ("istoica", "prof")) ) val users:RDD[(VertexId, (String, String))] = sc.paral原创 2021-11-05 10:13:11 · 2482 阅读 · 0 评论 -
Spark-2.4.8编译出错:Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.0:compile
错误描述[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.0:compile (scala-compile-first) on project spark-launcher_2.11: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.0:compile failed.: CompileFailed -原创 2021-10-04 18:09:18 · 868 阅读 · 0 评论 -
Spark:调用sortByKey时,不能正常排序
wordcount文件的内容最开始的部分代码如下val inputRdd:RDD[String] = sc.textFile("/sparkData/wordcount") val resultRdd = inputRdd.flatMap(x => x.split("\\s+")) .map(x=>(x, 1)). reduceByKey((tmp, item) => tmp + item) resultRdd.foreach(x =>原创 2021-09-02 16:03:27 · 547 阅读 · 0 评论