Search in sources :

Example 1 with RaftMetaStorageOptions

use of org.apache.ignite.raft.jraft.option.RaftMetaStorageOptions in project ignite-3 by apache.

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(org.apache.ignite.raft.jraft.option.RaftMetaStorageOptions)

Example 2 with RaftMetaStorageOptions

use of org.apache.ignite.raft.jraft.option.RaftMetaStorageOptions in project ignite-3 by apache.

the class LocalRaftMetaStorageTest method newOptions.

private RaftMetaStorageOptions newOptions() {
    RaftMetaStorageOptions raftMetaStorageOptions = new RaftMetaStorageOptions();
    raftMetaStorageOptions.setNode(this.node);
    return raftMetaStorageOptions;
}
Also used : RaftMetaStorageOptions(org.apache.ignite.raft.jraft.option.RaftMetaStorageOptions)

Aggregations

RaftMetaStorageOptions (org.apache.ignite.raft.jraft.option.RaftMetaStorageOptions)2