package com.test import breeze.signal.OptWindowFunction.User import org.apache.log4j.{Level, Logger} import org.apache.spark.graphx.{Edge, Graph, VertexId} import org.apache.spark.sql.SparkSession object GraphxDemoBILIBILI2 { def main(args: Array[String]): Unit = { // 屏蔽日志 //Logger.getLogger("org.apache.spark").setLevel(Level.WARN) val spark = SparkSession.builder() .master("local[*]") .appName(this.getClass.getName) .config("spark.ui.port", "30101") .getOrCreate() val sc = spark.sparkContext spark.sparkContext.setLogLevel("ERROR") // For implicit conversions like converting RDDs to Dataframes import spark.implicits._ import org.apache.spark.sql.functions._ //解决:无法重载方法agg // 设置顶点和边 都是元组定义的 // 顶点的数据类型: VertexRDD(VertexId,VD[String,Int]) val vertexArrary = Array( (1L, ("alice", 28)) , (2L, ("jack", 28)) , (3L, ("
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)