amygbAI commented on issue #170:
URL:
https://github.com/apache/incubator-graphar/issues/170#issuecomment-2117428155
here's what i did so far ..
1. in the incubator-graphar/maven-projects/spark/graphar/testing folder,
created a build.sbt ` name := "testing"
version := "0.1"
scalaVersion := "2.13.12"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "3.3.1"
`
2. in the src/main/scala - used your test file like so `import
org.apache.spark.sql.SparkSession
import org.apache.graphar.graph.GraphWriter
object MainObject { // This is your main object
def main(args: Array[String]): Unit = {
// connect to the Neo4j instance
val spark = SparkSession.builder()
.appName("Neo4j to GraphAr for Movie Graph")
.config("neo4j.url", "bolt://localhost:7687")
.config("neo4j.authentication.type", "basic")
.config("neo4j.authentication.basic.username", "neo4j")
.config("neo4j.authentication.basic.password", "slayer#666")
.config("spark.master", "local")
.getOrCreate()
// initialize a graph writer
val writer: GraphWriter = new GraphWriter()
// put movie graph data into writer
readAndPutDataIntoWriter(writer, spark)
// write in GraphAr format
val outputPath: String = args(0)
val vertexChunkSize: Long = args(1).toLong
val edgeChunkSize: Long = args(2).toLong
val fileType: String = args(3)
writer.write(outputPath, spark, "MovieGraph", vertexChunkSize,
edgeChunkSize, fileType)
}
}
`
and when i "sbt run" it from testing folder i got the errors
[error]
/datadrive/GRAPH_AR/incubator-graphar/maven-projects/spark/graphar/testing/src/main/scala/test_170_json_read_write.scala:2:19:
object graphar is not a member of package org.apache
[error] import org.apache.graphar.graph.GraphWriter
so i thought i might need to go rebuild the scala packages again and went to
incubator-graphar/maven-projects/spark/graphar and ran "mvn -X clean
install" and ran into the following errors
[ERROR] Failed to execute goal on project graphar-commons: Could not resolve
dependencies for project org.apache.graphar:graphar-commons:jar:0.1.0-SNAPSHOT:
Could not find artifact
org.apache.graphar:graphar-datasources:jar:0.1.0-SNAPSHOT
so bottomline is that unless i can include the correct jar file i doubt if i
will be able to test anything ( and the jar file isn't getting compiled thanks
to all the issues above )
my guess is that i am missing something fundamental here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]