Search in sources :

Example 6 with ShardManagerSnapshot

use of org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot in project controller by opendaylight.

the class ShardManager method onRecoveryCompleted.

@SuppressWarnings("checkstyle:IllegalCatch")
private void onRecoveryCompleted() {
    LOG.info("Recovery complete : {}", persistenceId());
    if (currentSnapshot == null && restoreFromSnapshot != null && restoreFromSnapshot.getShardManagerSnapshot() != null) {
        ShardManagerSnapshot snapshot = restoreFromSnapshot.getShardManagerSnapshot();
        LOG.debug("{}: Restoring from ShardManagerSnapshot: {}", persistenceId(), snapshot);
        applyShardManagerSnapshot(snapshot);
    }
    createLocalShards();
}
Also used : ShardManagerSnapshot(org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot)

Aggregations

ShardManagerSnapshot (org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot)6 TestKit (akka.testkit.javadsl.TestKit)5 Test (org.junit.Test)5 AddressFromURIString (akka.actor.AddressFromURIString)4 AbstractShardManagerTest (org.opendaylight.controller.cluster.datastore.AbstractShardManagerTest)4 MockConfiguration (org.opendaylight.controller.cluster.datastore.utils.MockConfiguration)4 UpdateSchemaContext (org.opendaylight.controller.cluster.datastore.messages.UpdateSchemaContext)3 DatastoreSnapshot (org.opendaylight.controller.cluster.datastore.persisted.DatastoreSnapshot)3 ActorRef (akka.actor.ActorRef)2 Status (akka.actor.Status)2 AddShardReplica (org.opendaylight.controller.cluster.datastore.messages.AddShardReplica)2 ChangeShardMembersVotingStatus (org.opendaylight.controller.cluster.datastore.messages.ChangeShardMembersVotingStatus)2 ShardSnapshot (org.opendaylight.controller.cluster.datastore.persisted.DatastoreSnapshot.ShardSnapshot)2 FollowerInitialSyncUpStatus (org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus)2 AddServerReply (org.opendaylight.controller.cluster.raft.messages.AddServerReply)2 ChangeServersVotingStatus (org.opendaylight.controller.cluster.raft.messages.ChangeServersVotingStatus)2 ServerChangeStatus (org.opendaylight.controller.cluster.raft.messages.ServerChangeStatus)2 ActorSystem (akka.actor.ActorSystem)1 Failure (akka.actor.Status.Failure)1 TestActorRef (akka.testkit.TestActorRef)1