注意:
使用GraphLoader函数时对于Scala、Spark版本有兼容问题。
由于之前scalaVersion用的别的版本,所以一直出现版本不兼容的问题,导致代码无法生成jar包
Error:scalac: bad symbolic reference to org.apache.spark.Logging encountered in class file’GraphLoader.class’.
Cannot access type Logging in package org.apache.spark. The current classpath may be
missing a definition for org.apache.spark.Logging, or GraphLoader.class may have been compiled against a version that’s
incompatible with the one found on the current classpath.
1、源码解析
// 从特定的边列表文件中读取数据生成图框架
--val graph = GraphLoader.edgeListFile(sc, "hdfs://IP地址:9000/wy/Edge/followers.txt")--
// 用上面的图框架来调用pageRank(动态)算法
//特别注意:静态调用的