开始的第一步是引入Spark和GraphX到你的项目中,如下面所示
import org.apache.spark._import org.apache.spark.graphx._// To make some of the examples work we will also need RDDimport org.apache.spark.rdd.RDD
如果你没有用到Spark shell,你还将需要SparkContext。