spark 2.4.4
nebula 3.2.2
def writeConfig(): NebulaConnectionConfig = {
val writeConfig = NebulaConnectionConfig
.builder()
.withMetaAddress(“1.192.217.50:9559”) //所有 Meta 服务的地址,多个地址用英文逗号(,)
.withGraphAddress(“1.192.217.50:9669”) //Graph 服务的地址,多个地址用英文逗号(,)隔开
.withConenctionRetry(2) //Nebula Java Client 连接 Nebula Graph 的重试次数。默认值为1。
.build()
writeConfig
}
---------部分代码-------------
long(“入库label”)
val labelResult = url.where("label is not null and label !=‘’ ").select(“label”)
.distinct()
.toDF(“vid”)
labelResult.show(200, false)
NebulaUtils.writeVertex(labelResult, withSpace, “label”)
22/10/17 11:45:55 ERROR NebulaVertexWriter: failed to write INSERT vertex label
() VALUES “盗版侵权类”: () for SemanticError: Space was not chosen.