neo4j-import:必须按递增节点ID的顺序提供NodeLabelUpdates

时间:2015-09-25 17:31:08

标签: csv neo4j

在尝试导入从维基百科数据生成的csv时,我收到以下错误:

rolf@shogun:~$ neo4j-import --into wiki.db --id-type string --bad-tolerance 12998873 --skip-bad-relationships true --multiline-fields true --nodes:Page entities2.csv --relationships:LINK links2.csv --stacktrace true --skip-duplicate-nodes true
Importing the contents of these files into wiki.db:
Nodes:
  :Page
  /home/rolf/entities2.csv
Relationships:
  :LINK
  /home/rolf/links2.csv

Available memory:
  Free machine memory: 25.75 GB
  Max heap memory : 6.98 GB

Nodes
[>:??-------------|*PROPERTIES----------|NODE:7.63 MB---|LABEL SCAN-----------|v:??------------]100k
Done in 485ms
Prepare node index
[*RESOLVE (2412 collisions):15.61 MB-----------------------------------------------------------] 90k
Done in 377ms
Calculate dense nodes
[>:27.21 MB/|PREPARE---------------|*DIVIDE----------------------------------------------------]  4M
Done in 52s 534ms
Relationships
[*>:136.04 MB/s---------------------|PREPARE(2)========================|PROPERT|v:208.52 MB/s--]  7M
Done in 10s 453ms
Node --> Relationship
Import error: NodeLabelUpdates must be supplied in order of ascending node id
java.lang.IllegalArgumentException: NodeLabelUpdates must be supplied in order of ascending node id
    at org.neo4j.kernel.api.impl.index.LuceneLabelScanWriter.write(LuceneLabelScanWriter.java:72)
    at org.neo4j.unsafe.impl.batchimport.UpdateNodeRecordsStep.update(UpdateNodeRecordsStep.java:81)
    at org.neo4j.unsafe.impl.batchimport.UpdateNodeRecordsStep.update(UpdateNodeRecordsStep.java:38)
    at org.neo4j.unsafe.impl.batchimport.UpdateRecordsStep.process(UpdateRecordsStep.java:65)
    at org.neo4j.unsafe.impl.batchimport.UpdateRecordsStep.process(UpdateRecordsStep.java:39)
    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)

我已经尝试过滤&和/但仍然是相同的错误(在类似的问题中提到)。

关系csv(links2.csv)主要包含在entities2.csv中不存在的引用,因为它只是数据的一小部分。

我正在使用neo4j 2.2.5

1 个答案:

答案 0 :(得分:1)

这是已在代码库中修复的已知问题,请参阅https://github.com/neo4j/neo4j/commit/45520e329403e166743b0027e75f2f658019ceae。您可以等待2.2分支或2.3分支中的下一个版本(另一个里程碑或RC)。或者,抓住源代码并自己构建快照。