2016-06-09 97 views
0

我從AWS Marketplace AMI運行OrientDB 2.1.2。我已經使用ETL來加載兩組頂點。現在我試圖用ETL將一個Edges文件加載到OrientDB中,並獲取:IllegalArgumentException:目標頂點爲空。我查看了網上的文檔和一些其他示例,我的ETL配置對我來說是正確的。我希望有人可能有一個想法。使用OrientDB ETL加載邊緣文件

我的兩個V子類:

作者(的AuthorID,authGivenName,authSurname)和AUTHORID

摘要(abstractId)與指數abstractId

我的E指數子類

創作 - 未定義屬性或索引

我的邊緣文件

(AUTHORID,abstractId) - \噸與這些名字一個標題行分隔的字段

我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 @[email protected]) 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成功找到了作者頂點,而EDGE成功找到Abstract Vertex(基於查看輸出中的RID)。我很難理解爲什麼我得到例外。提前感謝任何指針。

回答

0

你有沒有試過看看是否有新的etl,teleporter,2.2版解決了這個問題? 在這個link有關於新的etl產品的描述。

+0

感謝您的建議。不幸的是,我從原始XML文件中提取我的圖形數據,並沒有發揮RDBMS的作用。 –

0

我發現OrientDB 2.2.2版本的ETL loader似乎已經解決了這個問題。 (注意:版本2.2.0仍然有相同的問題)