Janusgraph如何处理global_offline错误配置

时间:2019-02-21 09:17:29

标签: graph-databases tinkerpop3 janusgraph

当我厌倦删除索引时,在 ManagementSystem userConfig 中键入了错误的 GLOBAL_OFFLINE 设置,但我错误地键入了“索引” .search.backend”和目录字符串......

当我尝试打开此janusgraph时,打印结果如下:

WARN  org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration  
       Local setting index.search.backend=lucene (Type: GLOBAL_OFFLINE) is overridden by globally managed value (/data/lucene).  Use the ManagementSystem interface instead of the local configuration to control this setting.
INFO  org.janusgraph.diskstorage.Backend  - Configuring index [search]    
       Could not find implementation class: /data/lucene

我想知道我是否可以在后端不删除该表并解决此问题! 很多!

1 个答案:

答案 0 :(得分:1)

我认为我已经解决了这个问题!
我只使用 KCVS 后端,并找到 GraphDatabaseConfiguration 的源代码;

我尝试使用以下代码获取KCVSConfig:

    PropertiesConfiguration configuration = new PropertiesConfiguration(GRAPH_PROPERTIES);

    ReadConfiguration localConfig = new CommonsConfiguration(configuration);
    BasicConfiguration localBasicConfiguration = new BasicConfiguration(ROOT_NS,localConfig, BasicConfiguration.Restriction.NONE);

    KeyColumnValueStoreManager storeManager = Backend.getStorageManager(localBasicConfiguration);

    KCVSConfiguration KCVSConfig =Backend.getStandaloneGlobalConfiguration(storeManager,localBasicConfiguration);

只需使用 KCVSConfiguration 删除所有索引配置!