使用neo4j-import将CSV导入Neo4j 2.2.4失败

时间:2015-08-13 16:38:50

标签: neo4j

尝试使用neo4j-import实用程序将CSV文件导入Neo4J时遇到错误。以下是我的环境的一些基本信息:

操作系统:Ubuntu 14.04.2 LTS(我的Windows 8笔记本电脑本地也出现了同样的错误)

Neo4J:2.2.4

我尝试导入的数据有203,738个节点和1,402,107个关系。

util的输出如下所示:

goord.default

将这些文件的内容导入/var/lib/neo4j/data/graph.db:

neo4j-import --into /var/lib/neo4j/data/graph.db --nodes nodes.csv.gz --relationships rels.csv.gz

但是我能够使用LOAD CSV命令成功导入这些内容,因此它显示为neo4j-import实用程序特有的内容?

以下是我的CSV文件的前几行:

nodes.csv:

Nodes:
  /home/vagrant/nodes.csv.gz
Relationships:
  /home/vagrant/rels.csv.gz

Available memory:
  Free machine memory: 578.82 MB
  Max heap memory : 643.81 MB

Nodes
[>:8.18 MB/s---|PROPERTIES-------------|NODE:7.63 MB-|*LABEL SCAN---------------------|v:2.64 M]210k
Done in 10s 521ms
Prepare node index
[*DETECT:8.41 MB-------------------------------------------------------------------------------]200k
Done in 1s 507ms
Calculate dense nodes
[>:81.42 kB/s---------------------|*PREPARE(2)===================================|DIV|CALCULATO]630kImport error: Panic called, so exiting

**********

This is what it says in the messages log:

2015-08-13 15:06:28.912+0000 INFO  [org.neo4j]: Import starting
2015-08-13 15:06:29.161+0000 INFO  [org.neo4j]: Creating new db @ /var/lib/neo4j/data/graph.db/neostore
2015-08-13 15:06:29.881+0000 INFO  [org.neo4j]: Missing counts store, rebuilding it.
2015-08-13 15:12:57.895+0000 INFO  [org.neo4j]: About to rotate counts store at transaction 1 to [/var/lib/neo4j/data/graph.db/neostore.counts.db.b], from [/var/lib/neo4j/data/graph.db/neostore.counts.db.a].
2015-08-13 15:12:57.905+0000 INFO  [org.neo4j]: Successfully rotated counts store at transaction 1 to [/var/lib/neo4j/data/graph.db/neostore.counts.db.b], from [/var/lib/neo4j/data/graph.db/neostore.counts.db.a].
2015-08-13 15:12:58.112+0000 ERROR [org.neo4j]: Error during import Panic called, so exiting
java.lang.RuntimeException: Panic called, so exiting
        at org.neo4j.unsafe.impl.batchimport.staging.AbstractStep.assertHealthy(AbstractStep.java:200)
        at org.neo4j.unsafe.impl.batchimport.staging.AbstractStep.await(AbstractStep.java:191)
        at org.neo4j.unsafe.impl.batchimport.staging.ProcessorStep.receive(ProcessorStep.java:98)
        at org.neo4j.unsafe.impl.batchimport.staging.ProducerStep.process(ProducerStep.java:77)
        at org.neo4j.unsafe.impl.batchimport.staging.ProducerStep$1.run(ProducerStep.java:54)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -167079
        at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.StringEncoder.getCode(StringEncoder.java:157)
        at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.StringEncoder.encodeInt(StringEncoder.java:80)
        at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.StringEncoder.encode(StringEncoder.java:57)
        at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.encode(EncodingIdMapper.java:228)
        at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.binarySearch(EncodingIdMapper.java:300)
        at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.get(EncodingIdMapper.java:176)
        at org.neo4j.unsafe.impl.batchimport.RelationshipPreparationStep.process(RelationshipPreparationStep.java:55)
        at org.neo4j.unsafe.impl.batchimport.RelationshipPreparationStep.process(RelationshipPreparationStep.java:36)
        at org.neo4j.unsafe.impl.batchimport.staging.ProcessorStep$4.run(ProcessorStep.java:120)
        at org.neo4j.unsafe.impl.batchimport.staging.ProcessorStep$4.run(ProcessorStep.java:102)
        at org.neo4j.unsafe.impl.batchimport.executor.DynamicTaskExecutor$Processor.run(DynamicTaskExecutor.java:237)


**********

My headers are as such:

Nodes
:ID,CODE,STR,:LABEL

Rels
:START_ID,:TYPE,:END_ID

Once thing I noticed in related threads was discussion regarding special characters in the data.  My STR field in the node data potentially contains some weird stuff, for example:


3519772,1046799,"{12 (Acetaminophen 325 MG / Chlorpheniramine Maleate 2 MG / Phenylephrine Hydrochloride 5 MG Oral Tablet) / 12 (Acetaminophen 325 MG / Phenylephrine Hydrochloride 5 MG Oral Tablet) } Pack",GPCK

rels.csv:

:ID,CODE,STR,:LABEL<br />
3281784,1000016,Uritact,BN<br />
3281901,1000086,Lastacaft,BN<br />
3500930,1000108,Xeomin,BN<br />
3284202,1000585,"Sentry AQ Mardel Clout",BN<br />
3284210,1000593,Carticel,BN<br />

无论如何,我很难过。提前致谢!

0 个答案:

没有答案