Search in sources :

Example 1 with RaftMetaStorageOptions

use of io.dingodb.raft.option.RaftMetaStorageOptions in project dingo by dingodb.

the class NodeImpl method initMetaStorage.

private boolean initMetaStorage() {
    this.metaStorage = this.serviceFactory.createRaftMetaStorage(this.options.getRaftMetaUri(), this.raftOptions);
    RaftMetaStorageOptions opts = new RaftMetaStorageOptions();
    opts.setNode(this);
    if (!this.metaStorage.init(opts)) {
        LOG.error("Node {} init meta storage failed, uri={}.", this.serverId, this.options.getRaftMetaUri());
        return false;
    }
    this.currTerm = this.metaStorage.getTerm();
    this.votedId = this.metaStorage.getVotedFor().copy();
    return true;
}
Also used : RaftMetaStorageOptions(io.dingodb.raft.option.RaftMetaStorageOptions)

Aggregations

RaftMetaStorageOptions (io.dingodb.raft.option.RaftMetaStorageOptions)1