使用spark将边写入orientDB时发生错误

时间:2019-02-13 06:01:22

标签: apache-spark orientdb

使用spark api首先将顶点写入orientDB,然后写入edge。报告了错误“ com.orientechnologies.orient.core.exception.OCommandExecutionException:类Egraphx已经存在”。 //     使用Spark Cluster-Client模式     orientDB版本:3.0.13     星火版本:2.2.1     org.apache.spark     spark-orientdb-2.2.1_2.11     1.4

df_vex
.write
.format("org.apache.spark.orientdb.graphs")
.option("dburl", "remote:10.145.77.105:8424/addressList")
.option("user", "admin")
.option("password", "admin")
.option("vertextype", "Vgraphx")
.mode(SaveMode.Overwrite)
.save()
//
df_addressSelect
.select("phone", "num", "name")
.toDF("src", "dst", "name")
.write
.format("org.apache.spark.orientdb.graphs")
.option("dburl", "remote:10.145.77.105:8424/addressList")
.option("user", "admin")
.option("password", "admin")
.option("vertextype", "Vgraphx")
.option("edgetype", "Egraphx")
.mode(SaveMode.Overwrite)
.save()

0 个答案:

没有答案