|
19 | 19 |
|
20 | 20 | package org.elasticsearch.action.admin.cluster.snapshots.restore; |
21 | 21 |
|
22 | | -import org.apache.logging.log4j.LogManager; |
23 | 22 | import org.elasticsearch.ElasticsearchGenerationException; |
24 | 23 | import org.elasticsearch.Version; |
25 | 24 | import org.elasticsearch.action.ActionRequestValidationException; |
|
28 | 27 | import org.elasticsearch.common.Strings; |
29 | 28 | import org.elasticsearch.common.io.stream.StreamInput; |
30 | 29 | import org.elasticsearch.common.io.stream.StreamOutput; |
31 | | -import org.elasticsearch.common.logging.DeprecationLogger; |
32 | 30 | import org.elasticsearch.common.settings.Settings; |
33 | 31 | import org.elasticsearch.common.xcontent.ToXContentObject; |
34 | 32 | import org.elasticsearch.common.xcontent.XContentBuilder; |
|
43 | 41 | import java.util.Objects; |
44 | 42 |
|
45 | 43 | import static org.elasticsearch.action.ValidateActions.addValidationError; |
| 44 | +import static org.elasticsearch.common.settings.Settings.Builder.EMPTY_SETTINGS; |
46 | 45 | import static org.elasticsearch.common.settings.Settings.readSettingsFromStream; |
47 | 46 | import static org.elasticsearch.common.settings.Settings.writeSettingsToStream; |
48 | | -import static org.elasticsearch.common.settings.Settings.Builder.EMPTY_SETTINGS; |
49 | 47 | import static org.elasticsearch.common.xcontent.support.XContentMapValues.nodeBooleanValue; |
50 | 48 |
|
51 | 49 | /** |
52 | 50 | * Restore snapshot request |
53 | 51 | */ |
54 | 52 | public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotRequest> implements ToXContentObject { |
55 | 53 |
|
56 | | - private static final DeprecationLogger DEPRECATION_LOGGER = new DeprecationLogger(LogManager.getLogger(RestoreSnapshotRequest.class)); |
57 | | - |
58 | 54 | private String snapshot; |
59 | 55 | private String repository; |
60 | 56 | private String[] indices = Strings.EMPTY_ARRAY; |
@@ -459,12 +455,6 @@ public RestoreSnapshotRequest source(Map<String, Object> source) { |
459 | 455 | } |
460 | 456 | } else if (name.equals("partial")) { |
461 | 457 | partial(nodeBooleanValue(entry.getValue(), "partial")); |
462 | | - } else if (name.equals("settings")) { |
463 | | - if (!(entry.getValue() instanceof Map)) { |
464 | | - throw new IllegalArgumentException("malformed settings section"); |
465 | | - } |
466 | | - DEPRECATION_LOGGER.deprecatedAndMaybeLog("RestoreSnapshotRequest#settings", |
467 | | - "specifying [settings] when restoring a snapshot has no effect and will not be supported in a future version"); |
468 | 458 | } else if (name.equals("include_global_state")) { |
469 | 459 | includeGlobalState = nodeBooleanValue(entry.getValue(), "include_global_state"); |
470 | 460 | } else if (name.equals("include_aliases")) { |
|
0 commit comments