有人有火花流写和阅读JanusGraph的经验吗?我正在尝试遵循tinkerpop测试中的代码
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>spark-gremlin</artifactId>
<version>3.3.4</version>
</dependency>
def getSparkJanusConfig: BaseConfiguration = {
val conf = new BaseConfiguration()
conf.setProperty(Graph.GRAPH, "org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph")
conf.setProperty("gremlin.hadoop.graphInputFormat", "org.janusgraph.hadoop.formats.cassandra.CassandraInputFormat")
// ####################################
// # Cassandra Cluster Config #
// ####################################
conf.setProperty("janusgraphmr.ioformat.conf.storage.backend", "cassandrathrift")
conf.setProperty("storage.backend", "cassandra")
conf.setProperty("storage.hostname", "127.0.0.1")
conf.setProperty("cassandra.input.partitioner.class", "org.apache.cassandra.dht.Murmur3Partitioner")
// ####################################
// # Spark Configuration #
// ####################################
conf.setProperty("spark.master", "local[4]")
conf.setProperty(Constants.GREMLIN_SPARK_PERSIST_CONTEXT, "true")
conf.setProperty(Constants.SPARK_SERIALIZER, "org.apache.tinkerpop.gremlin.spark.structure.io.gryo.GryoSerializer")
conf
}
/* SAVING TO JANUS */
val gremlinSpark = Spark.create(spark.sparkContext)
val graph = GraphFactory.open(getSparkJanusConfig)