使用OrientDB ETL加载边缘文件

时间:2016-06-09 12:43:13

标签: orientdb orientdb-2.1 orientdb-etl

我正在从AWS Marketplace AMI运行OrientDB 2.1.2。我已经使用ETL加载了两组顶点。现在我正在尝试使用ETL将Edges文件加载到OrientDB中并获取:IllegalArgumentException:destination vertex为null。我已经查看了网络上的文档和其他一些示例,我的ETL配置对我来说是正确的。我希望有人可能有个主意。

我的两个V子类是:

  

作者(authorId,authGivenName,authSurname)和authorId的索引

     

AbstractId

上的索引的Abstract(abstractId)

我的E子类

  

创作 - 没有定义任何属性或索引

我的边缘文件

  

(authorId,abstractId) - \ t分隔的字段,其中一个标题行带有这些名称

我的ETL配置:

{
  "config": { "log":"debug"},
  "source" : { "file": { "path":"/root/poc1_Datasets/authAbstractEdge1.tsv" }},
  "extractor":{ "row":{} },
  "transformers":[
       { "csv":{ "separator": "\t" } },
       { "merge": {
           "joinFieldName": "authorId",
           "lookup":"Author.authorId"
        } },
       { "vertex":{ "class":"Author" } },
       { "edge" : {
           "class": "Authored",
           "joinFieldName": "abstractId",
           "lookup": "Abstract.abstractId",
           "direction": "out"
        }}
  ],
  "loader":{
    "orientdb":{
        "dbURL":"remote:localhost/DataSpine1",
        "dbType":"graph",
        "wal":false,
        "tx":false
   } }
}

当我使用此配置和文件运行ETL时,我得到:

OrientDB etl v.2.1.2 (build @BUILD@) www.orientdb.com
BEGIN ETL PROCESSOR
[file] DEBUG Reading from file /root/poc1_Datasets/authAbstractEdge1.tsv
[0:csv] DEBUG Transformer input: authorId   abstractId
[0:csv] DEBUG parsing=authorId  abstractId
[0:csv] DEBUG Transformer output: null

2016-06-09 12:15:04:088 WARNI Transformer [csv] returned null, skip rest of pipeline execution [OETLPipeline][1:csv] DEBUG Transformer input: 9-s2.0-10039026700    2-s2.0-29144536313
[1:csv] DEBUG parsing=9-s2.0-10039026700    2-s2.0-29144536313
[1:csv] DEBUG document={authorId:9-s2.0-10039026700,abstractId:2-s2.0-29144536313}
[1:csv] DEBUG Transformer output: {authorId:9-s2.0-10039026700,abstractId:2-s2.0-29144536313}
[1:merge] DEBUG Transformer input: {authorId:9-s2.0-10039026700,abstractId:2-s2.0-29144536313}
[1:merge] DEBUG joinValue=9-s2.0-10039026700, lookupResult=Author#12:10046021{authorId:9-s2.0-10039026700,authGivenName:M. A.,authSurname:Turovskaya,abstractId:2-s2.0-29144536313} v2
[1:merge] DEBUG merged record Author#12:10046021{authorId:9-s2.0-10039026700,authGivenName:M. A.,authSurname:Turovskaya,abstractId:2-s2.0-29144536313} v2 with found record={authorId:9-s2.0-10039026700,abstractId:2-s2.0-29144536313}
[1:merge] DEBUG Transformer output: Author#12:10046021{authorId:9-s2.0-10039026700,authGivenName:M. A.,authSurname:Turovskaya,abstractId:2-s2.0-29144536313} v2
[1:vertex] DEBUG Transformer input: Author#12:10046021{authorId:9-s2.0-10039026700,authGivenName:M. A.,authSurname:Turovskaya,abstractId:2-s2.0-29144536313} v2
[1:vertex] DEBUG Transformer output: v(Author)[#12:10046021]
[1:edge] DEBUG Transformer input: v(Author)[#12:10046021]
[1:edge] DEBUG joinCurrentValue=2-s2.0-29144536313, lookupResult=Abstract#13:16626366{abstractId:2-s2.0-29144536313} v1
Error in Pipeline execution: java.lang.IllegalArgumentException: destination vertex is null
java.lang.IllegalArgumentException: destination vertex is null
    at com.tinkerpop.blueprints.impls.orient.OrientVertex.addEdge(OrientVertex.java:888)
    at com.tinkerpop.blueprints.impls.orient.OrientVertex.addEdge(OrientVertex.java:832)
    at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.createEdge(OEdgeTransformer.java:188)
    at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:117)
    at com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
    at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:114)
    at com.orientechnologies.orient.etl.OETLProcessor.executeSequentially(OETLProcessor.java:487)
    at com.orientechnologies.orient.etl.OETLProcessor.execute(OETLProcessor.java:291)
    at com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.java:161)
ETL process halted: com.orientechnologies.orient.etl.OETLProcessHaltedException: java.lang.IllegalArgumentException: destination vertex is null

当我查看调试时,似乎MERGE成功找到了Author顶点,EDGE成功找到了Abstract Vertex(基于在输出中查看RID)。我很难过为什么我得到了例外。提前感谢任何指示。

2 个答案:

答案 0 :(得分:0)

您是否已经尝试过使用新的etl,teleporter,2.2版解决了这个问题? 在此link,有关于新etl产品的描述。

答案 1 :(得分:0)

我实际上发现OrientDB 2.2.2版中的ETL加载器似乎已经解决了这个问题。 (注意:版本2.2.0仍有相同的问题)