我有以下 SBT 文件,我正在使用 Apache GraphFrame 编译 Scala 代码并读取 CSV 文件。
name := "Simple"
version := "1.0"
scalaVersion := "2.10.5"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % "1.6.1",
"graphframes" % "graphframes" % "0.2.0-spark1.6-s_2.10",
"org.apache.spark" %% "spark-sql" % "1.0.0",
"com.databricks" % "spark-csv" % "1.0.3"
)
这是我在 Scala 中的代码
import org.graphframes._
import org.apache.spark.sql.DataFrame
val nodesList = sqlContext.read.format("com.databricks.spark.csv").option("header", "true").option("inferSchema", "true").load("/Users/Desktop/GraphFrame/NodesList.csv")
val edgesList= sqlContext.read.format("com.databricks.spark.csv").option("header", "true").option("inferSchema", "true").load("/Users/Desktop/GraphFrame/EdgesList.csv")
val v=nodesList.toDF("id", "name")
val e=edgesList.toDF("src", "dst", "dist")
val g = GraphFrame(v, e)
当我尝试使用 SBT 制作 Jar 文件时,在编译过程中出现以下错误
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: graphframes#graphframes;0.2.0-spark1.6-s_2.10: not found
[error] Total time: