1

我已经使用 Neo4j 批处理加载程序有一段时间了,今晚开始遇到从新的数据库导出构建我的图表的问题。运行它会产生以下结果:

> java -servjava -server -Xmx4G -jar ~/Dev/github.com/jexp/batch-import/target/batch-import-jar-with-dependencies.jar ./graph.db nodes.csv rels.csv node_index entities exact entities_idx.csv

Usage: Importer data/dir nodes.csv relationships.csv [node_index node-index-name fulltext|exact nodes_index.csv rel_index rel-index-name fulltext|exact rels_index.csv ....]
Using: Importer ./graph.db nodes.csv rels.csv node_index entities exact entities_idx.csv

Using Existing Configuration File
........................
Importing 2412268 Nodes took 4 seconds
.....................
Total import time: 9 seconds
Exception in thread "main" org.neo4j.graphdb.NotFoundException: id=2412269
    at org.neo4j.unsafe.batchinsert.BatchInserterImpl.getNodeRecord(BatchInserterImpl.java:917)
    at org.neo4j.unsafe.batchinsert.BatchInserterImpl.createRelationship(BatchInserterImpl.java:471)
    at org.neo4j.batchimport.Importer.importRelationships(Importer.java:136)
    at org.neo4j.batchimport.Importer.doImport(Importer.java:214)
    at org.neo4j.batchimport.Importer.main(Importer.java:78)

我能够成功地运行包含在其自己的存储库中的 nodes.csv 和 rels.csv 的批处理加载程序,所以我认为问题出在我的 rels.csv 文件中。但是,这是一个相当大的文件,我想知道 id=2412269 是什么意思,因为它似乎是诊断故障的最佳起点。

有任何想法吗?

_霍华德

4

2 回答 2

0

在与导入程序的作者一起解决问题后,事实证明问题在于我的 nodes.csv 文件中有单个未转义的引号。所以 rels.csv 记录指向了一个无法在 nodes.csv 中创建的节点。不幸的是,控制台上报告的错误并不完全是导致问题的错误。

于 2013-11-13T01:26:41.833 回答
0

这意味着在 rels.csv 文件中,您正在尝试为 id = 2412269 引用的节点创建关系。但是在您的 nodes.csv 文件中没有创建这样的节点。

于 2013-10-30T09:54:50.133 回答