0

我正在尝试从 Neo4J(neo4-shell)导入数据并加载到 OrientDB(gremlin.sh)中。然而,OrientDB 无法创建顶点,并且由于以下原因似乎失败了。

gremlin> g.loadGraphML('/tmp/out.graphml');                                                               
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'ACTED_IN' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'DIRECTED' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'PRODUCED' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'WROTE' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'FOLLOWS' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
Feb 11, 2016 12:42:10 PM com.orientechnologies.common.log.OLogManager log
WARNING: {db=neo2orient} The command 'create edge type 'REVIEWED' as subclass of 'E'' must be executed outside an active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction (db=neo2orient)
==>null
gremlin> exit


And data looks like this

<node id="n0" labels=":Movie"><data key="labels">:Movie</data><data key="title">The Matrix</data><data key="released">1999</data><data key="tagline">Welcome to the Real World</data></node>
<node id="n1" labels=":Person"><data key="labels">:Person</data><data key="name">Keanu Reeves</data><data key="born">1964</data></node>
<node id="n2" labels=":Person"><data key="labels">:Person</data><data key="name">Carrie-Anne Moss</data><data key="born">1967</data></node>
<node id="n3" labels=":Person"><data key="labels">:Person</data><data key="name">Laurence Fishburne</data><data key="born">1961</data></node>
<node id="n4" labels=":Person"><data key="labels">:Person</data><data key="name">Hugo Weaving</data><data key="born">1960</data></node>
<node id="n5" labels=":Person"><data key="labels">:Person</data><data key="name">Andy Wachowski</data><data key="born">1967</data></node>
<node id="n6" labels=":Person"><data key="labels">:Person</data><data key="name">Lana Wachowski</data><data key="born">1965</data></node>
<node id="n7" labels=":Person"><data key="labels">:Person</data><data key="name">Joel Silver</data><data key="born">1952</data></node>
<node id="n8" labels=":Person"><data key="labels">:Person</data><data key="name">Emil Eifrem</data><data key="born">1978</data></node>
<node id="n9" labels=":Movie"><data key="labels">:Movie</data><data key="title">The Matrix Reloaded</data><data key="released">2003</data><data key="tagline">Free your mind</data></node>

4

2 回答 2

0

谢谢卢卡的快速回复。它仍然没有帮助。使用 gremlin 从 neo 到 orient 的负载似乎不会创建顶点。但是,当我创建数据库并从同一个 GraphML 文件中导入相同的数据时,它只是毫无错误地使用它,并且所有数据都已导入。然后我比较了 neo 和 orient Graph UI 获得了接近相似的视图,但是 neo 显示了所有对象(节点、关系..)的属性,但 orient 没有显式地向它们显示任何属性。orient 是否隐式地维护属性?

于 2016-02-13T01:07:37.887 回答
0

您使用的是哪个 OrientDB 版本?

OrientDB 有一个模式,所以它试图自动创建顶点和边类。您可以将非事务性图表与:g = new com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx();

于 2016-02-12T14:33:52.013 回答