Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Bug 2948: Recovered log entries not applied after prior snapshot"
[controller.git]
/
opendaylight
/
md-sal
/
sal-akka-raft
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
example
/
ExampleActor.java
diff --git
a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java
b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java
index 77eaac2cfef076fd84959d0e9007fe6233413c9d..5ab3f69bea994d60644cca47b9694205ae2ab039 100644
(file)
--- a/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java
+++ b/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java
@@
-39,7
+39,7
@@
import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payloa
*/
public class ExampleActor extends RaftActor implements RaftActorRecoveryCohort, RaftActorSnapshotCohort {
*/
public class ExampleActor extends RaftActor implements RaftActorRecoveryCohort, RaftActorSnapshotCohort {
- private final Map<String, String> state = new HashMap();
+ private final Map<String, String> state = new HashMap
<>
();
private long persistIdentifier = 1;
private final Optional<ActorRef> roleChangeNotifier;
private long persistIdentifier = 1;
private final Optional<ActorRef> roleChangeNotifier;
@@
-136,12
+136,12
@@
public class ExampleActor extends RaftActor implements RaftActorRecoveryCohort,
public void applySnapshot(byte [] snapshot) {
state.clear();
try {
public void applySnapshot(byte [] snapshot) {
state.clear();
try {
- state.putAll((HashMap) toObject(snapshot));
+ state.putAll((HashMap
<String, String>
) toObject(snapshot));
} catch (Exception e) {
LOG.error("Exception in applying snapshot", e);
}
if(LOG.isDebugEnabled()) {
} catch (Exception e) {
LOG.error("Exception in applying snapshot", e);
}
if(LOG.isDebugEnabled()) {
- LOG.debug("Snapshot applied to state : {}", ((HashMap) state).size());
+ LOG.debug("Snapshot applied to state : {}", ((HashMap
<?, ?>
) state).size());
}
}
}
}