Search in sources :

Example 1 with LocalSnapshotPbMeta

use of io.dingodb.raft.entity.LocalStorageOutter.LocalSnapshotPbMeta in project dingo by dingodb.

the class LocalSnapshotMetaTable method loadFromFile.

/**
 * Load metadata infos from a file by path.
 */
public boolean loadFromFile(String path) throws IOException {
    ProtoBufFile pbFile = new ProtoBufFile(path);
    LocalSnapshotPbMeta pbMeta = pbFile.load();
    if (pbMeta == null) {
        LOG.error("Fail to load meta from {}.", path);
        return false;
    }
    return loadFromPbMeta(pbMeta);
}
Also used : LocalSnapshotPbMeta(io.dingodb.raft.entity.LocalStorageOutter.LocalSnapshotPbMeta) ProtoBufFile(io.dingodb.raft.storage.io.ProtoBufFile)

Aggregations

LocalSnapshotPbMeta (io.dingodb.raft.entity.LocalStorageOutter.LocalSnapshotPbMeta)1 ProtoBufFile (io.dingodb.raft.storage.io.ProtoBufFile)1