【问题标题】:neo4j batch import cache type issueneo4j 批量导入缓存类型问题
【发布时间】:2013-10-04 05:25:19
【问题描述】:

我对 neo4j 很陌生,面临以下问题。执行批量导入(Micheal Hunger - 批量导入器)命令时,我收到有关 cache_type 设置的错误。它是推荐 gcr 设置,但这些仅在企业版中可用。

非常感谢您的帮助,谢谢。

系统信息: win7 32bit 4G RAM(可用3G),jre7,neo4j-community-1.8.2

数据:(非常小的测试数据) nodes.csv(制表符分隔)13 个节点 rels.csv(制表符分隔)16 个关系

执行与错误:

C:\Daten\Studium\LV HU Berlin\SS 2013\Datamanagement and BI\Neuer Ordner>java -server -Xmx1G -jar target\batch-import-jar-with-dependencies.jar target\db nodes.csv rels.csv

使用现有的配置文件

Exception in thread "main" java.lang.IllegalArgumentException: Bad value 'none' for setting 'cache_type': must
     be one of [gcr]
        at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:788)
        at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:708)
        at        org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.ja    va:215)
        at     org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.ja    va:189)
        at        org.neo4j.kernel.configuration.ConfigurationValidator.validate(ConfigurationValidator.java:    50)
        at org.neo4j.kernel.configuration.Config.applyChanges(Config.java:121)
        at org.neo4j.kernel.configuration.Config.<init>(Config.java:89)
        at org.neo4j.kernel.configuration.Config.<init>(Config.java:79)
        at org.neo4j.unsafe.batchinsert.BatchInserterImpl.<init>(BatchInserterImpl.java:83)
        at org.neo4j.unsafe.batchinsert.BatchInserterImpl.<init>(BatchInserterImpl.java:67)
        at org.neo4j.unsafe.batchinsert.BatchInserters.inserter(BatchInserters.java:60)
        at org.neo4j.batchimport.Importer.createBatchInserter(Importer.java:40)
        at org.neo4j.batchimport.Importer.<init>(Importer.java:26)
        at org.neo4j.batchimport.Importer.main(Importer.java:54)

Batch.properties:

dump_configuration=false

cache_type=none

use_memory_mapped_buffers=true
neostore.propertystore.db.index.keys.mapped_memory=5M
neostore.propertystore.db.index.mapped_memory=5M
neostore.nodestore.db.mapped_memory=200M
neostore.relationshipstore.db.mapped_memory=500M
neostore.propertystore.db.mapped_memory=200M
neostore.propertystore.db.strings.mapped_memory=200M

【问题讨论】:

  • 批量导入器对企业有依赖,可以在测试/开发中使用,我觉得如果加了应该不错。
  • 感谢您的快速回复,但您能否具体一点。我对整个 neo4j 的开发和使用非常陌生,所以我需要知道在哪里添加一些东西以及更详细的内容。你的意思是我只能用企业版来测试/开发?

标签: neo4j


【解决方案1】:

遇到了和你一样的问题,我在 batch.properties 中更改了行

cache_type=nonecache_type=gcr 并且成功了。不确定速度如何变化。不知道为什么其他选项nonesoftweakstrong 不起作用。 也许迈克尔可以回答这个问题?

从 neo4j 文档中得到答案 http://docs.neo4j.org/chunked/stable/configuration-caches.html#_object_cache

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-05
    相关资源
    最近更新 更多