Star

nebula 使用exchange导入问题

  • nebula 版本:v1.1.0
  • 部署方式(分布式 / 单机 / Docker / DBaaS):Docker swarm

我这边使用exchange导入报错,请问exchange具体支持哪个版本
config得配置

{
  # Spark relation config
  spark: {
    app: {
      name: Spark Writer
    }

    driver: {
      cores: 1
      maxResultSize: 1G
    }

    cores {
      max: 16
    }
  }

  # Nebula Graph relation config
  nebula: {
    address:{
      graph:["9.134.72.45:3699","9.134.3.25:3699","9.134.55.213:3699"]
      meta:["9.134.72.45:45500","9.134.3.25:45500","9.134.55.213:45500"]
    }
    user: user
    pswd: password
    space: nba

    connection {
      timeout: 3000
      retry: 3
    }

    execution {
      retry: 3
    }

    error: {
      max: 32
      output: /tmp/errors
    }

    rate: {
      limit: 1024
      timeout: 1000
    }
  }

  # Processing tags
  tags: [

    # Loading tag from HDFS and data type is csv
    {
      name: player
      type: {
        source: csv
        sink: client
      }
      path: /tmp/tag
      fields: [name, age]
      nebula.fields: [name, age]
      vertex: name
      separator: "\t"
      header: false
      csv.fields: [name,age]
      batch: 256
      partition: 32
    }
  ]

  # Processing edges
  edges: [
    # Loading tag from HDFS and data type is csv
    {
      name: follow
      type: {
        source: csv
        sink: client
      }
      path: /tmp/edge
      fields: [src, tgt, degree]
      nebula.fields: [src, tgt, degree]
      source: {
        field: src
      }
      target: {
        field: tgt
      }
      separator: "\t"
      header: false
      csv.fields: [src, tgt, degree]
      batch: 256
      partition: 32
    }
  ]
}

错误

Exception in thread "main" java.lang.IllegalArgumentException
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:72)
        at com.google.common.net.HostAndPort.fromParts(HostAndPort.java:130)
        at com.vesoft.nebula.client.meta.MetaClientImpl.getPartsAlloc(MetaClientImpl.java:205)
        at com.vesoft.nebula.client.meta.MetaClientImpl.doConnect(MetaClientImpl.java:97)
        at com.vesoft.nebula.AbstractClient.connect(AbstractClient.java:93)
        at com.vesoft.nebula.tools.importer.utils.NebulaUtils$.getDataSourceFieldType(NebulaUtils.scala:50)
        at com.vesoft.nebula.tools.importer.processor.VerticesProcessor.process(VerticesProcessor.scala:137)
        at com.vesoft.nebula.tools.importer.Exchange$$anonfun$main$2.apply(Exchange.scala:174)
        at com.vesoft.nebula.tools.importer.Exchange$$anonfun$main$2.apply(Exchange.scala:152)
        at scala.collection.immutable.List.foreach(List.scala:392)
        at com.vesoft.nebula.tools.importer.Exchange$.main(Exchange.scala:152)
        at com.vesoft.nebula.tools.importer.Exchange.main(Exchange.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
        at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:845)
        at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:161)
        at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:184)
        at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
        at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:920)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:929)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

exchange目前只支持1.x的nebula
2.0版本对接的exchange coming soon~

你好,我这边使用v1.1.0还是报同样得错误

这个配置方式对应着11.13号之后的代码,你可以拉一下新的代码。
ps 你把配置文件贴出来看下吧,还有报错的日志贴多一些

看起来可能是版本和配置不统一导致的问题

嗯 像是哪个配置没配对

重贴了config,日志就这么多,没有更多了

你是Docker swarm 稍等我复现下,感觉是docker的ip访问问题

是通过meta服务获取storage服务的host信息时出错,你在nebula console中show hosts看下storage服务的hosts

脑阔疼,我这边被限制从docker hub拉取镜像了,起不来console了

exchange是自己编译的,你可以在内部打断点查看。
位置:

 > com.vesoft.nebula.tools.importer.processor.EdgeProcessor
    > metaClient.connect()
       > com.vesoft.nebula.client.meta.MetaClientImpl#doConnect
         >com.vesoft.nebula.client.meta.MetaClientImpl#getPartsAlloc
           >response = client.getPartsAlloc(request);

看下response中的parts中的HostAddr。 这个hostAddr应该有问题,所以会报错你上面的错误信息。

好的

参考一下 我之前的帖子

1赞

你们两个的问题不一样,@zzz 是docker中通过meta服务获取到的storage服务的host无法识别。

找到原因了,hosts应该是被其他版本的历史数据污染了,导致有多个异常host

3赞

浙ICP备20010487号