Search in sources :

Example 1 with RaftBackendStoreProvider

use of com.baidu.hugegraph.backend.store.raft.RaftBackendStoreProvider in project incubator-hugegraph by apache.

the class BackendProviderFactory method open.

public static BackendStoreProvider open(HugeGraphParams params) {
    HugeConfig config = params.configuration();
    String backend = config.get(CoreOptions.BACKEND).toLowerCase();
    String graph = config.get(CoreOptions.STORE);
    boolean raftMode = config.get(CoreOptions.RAFT_MODE);
    BackendStoreProvider provider = newProvider(config);
    if (raftMode) {
        LOG.info("Opening backend store '{}' in raft mode for graph '{}'", backend, graph);
        provider = new RaftBackendStoreProvider(provider, params);
    }
    provider.open(graph);
    return provider;
}
Also used : RaftBackendStoreProvider(com.baidu.hugegraph.backend.store.raft.RaftBackendStoreProvider) RaftBackendStoreProvider(com.baidu.hugegraph.backend.store.raft.RaftBackendStoreProvider) HugeConfig(com.baidu.hugegraph.config.HugeConfig)

Aggregations

RaftBackendStoreProvider (com.baidu.hugegraph.backend.store.raft.RaftBackendStoreProvider)1 HugeConfig (com.baidu.hugegraph.config.HugeConfig)1