public void applyRecoverySnapshot(final Snapshot.State snapshotState) {
if (!(snapshotState instanceof ShardSnapshotState)) {
log.debug("{}: applyRecoverySnapshot ignoring snapshot: {}", shardName, snapshotState);
public void applyRecoverySnapshot(final Snapshot.State snapshotState) {
if (!(snapshotState instanceof ShardSnapshotState)) {
log.debug("{}: applyRecoverySnapshot ignoring snapshot: {}", shardName, snapshotState);
final File f = writeRoot("snapshot", shardSnapshot.getRootNode().orElse(null));
throw new IllegalStateException(String.format(
"%s: Failed to apply recovery snapshot %s. Node data was written to file %s",
final File f = writeRoot("snapshot", shardSnapshot.getRootNode().orElse(null));
throw new IllegalStateException(String.format(
"%s: Failed to apply recovery snapshot %s. Node data was written to file %s",