Rename SLM package to slm (#44608)
This commit renames the SLM package from snapshotlifecycle to slm. We have all come to know index lifecycle management as ILM, the APIs and settings use ilm, and it would be nice of the package did too. For SLM, let's use slm for all of these including the package name from the beginning.
This commit is contained in:
parent
4456850a8e
commit
5878bde8dc
|
@ -6,6 +6,6 @@
|
|||
|
||||
/**
|
||||
* Contains the action definitions for SLM. For the transport and rest action implementations, please see the {@code ilm} module's
|
||||
* {@code org.elasticsearch.xpack.snapshotlifecycle} package.
|
||||
* {@code org.elasticsearch.xpack.slm} package.
|
||||
*/
|
||||
package org.elasticsearch.xpack.core.snapshotlifecycle.action;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/**
|
||||
* This is the Snapshot Lifecycle Management (SLM) core package. This package contains the core classes for SLM, including all of the
|
||||
* custom cluster state metadata objects, execution history storage facilities, and the action definitions. For the main SLM service
|
||||
* implementation classes, please see the {@code ilm}ilm module's {@code org.elasticsearch.xpack.snapshotlifecycle} package.
|
||||
* implementation classes, please see the {@code ilm}ilm module's {@code org.elasticsearch.xpack.slm} package.
|
||||
*
|
||||
* <p>Contained within this specific package are the custom metadata objects and models used through out the SLM service. The names can
|
||||
* be confusing, so it's important to know the differences between each metadata object.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle;
|
||||
package org.elasticsearch.xpack.slm;
|
||||
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
|
@ -87,16 +87,16 @@ import org.elasticsearch.xpack.indexlifecycle.action.TransportRemoveIndexLifecyc
|
|||
import org.elasticsearch.xpack.indexlifecycle.action.TransportRetryAction;
|
||||
import org.elasticsearch.xpack.indexlifecycle.action.TransportStartILMAction;
|
||||
import org.elasticsearch.xpack.indexlifecycle.action.TransportStopILMAction;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleService;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleTask;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.action.RestDeleteSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.action.RestExecuteSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.action.RestGetSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.action.RestPutSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.action.TransportDeleteSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.action.TransportExecuteSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.action.TransportGetSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.action.TransportPutSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.slm.SnapshotLifecycleService;
|
||||
import org.elasticsearch.xpack.slm.SnapshotLifecycleTask;
|
||||
import org.elasticsearch.xpack.slm.action.RestDeleteSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.slm.action.RestExecuteSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.slm.action.RestGetSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.slm.action.RestPutSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.slm.action.TransportDeleteSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.slm.action.TransportExecuteSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.slm.action.TransportGetSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.slm.action.TransportPutSnapshotLifecycleAction;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.Clock;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle;
|
||||
package org.elasticsearch.xpack.slm;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle;
|
||||
package org.elasticsearch.xpack.slm;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle.action;
|
||||
package org.elasticsearch.xpack.slm.action;
|
||||
|
||||
import org.elasticsearch.client.node.NodeClient;
|
||||
import org.elasticsearch.common.settings.Settings;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle.action;
|
||||
package org.elasticsearch.xpack.slm.action;
|
||||
|
||||
import org.elasticsearch.client.node.NodeClient;
|
||||
import org.elasticsearch.common.settings.Settings;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle.action;
|
||||
package org.elasticsearch.xpack.slm.action;
|
||||
|
||||
import org.elasticsearch.client.node.NodeClient;
|
||||
import org.elasticsearch.common.Strings;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle.action;
|
||||
package org.elasticsearch.xpack.slm.action;
|
||||
|
||||
import org.elasticsearch.client.node.NodeClient;
|
||||
import org.elasticsearch.common.settings.Settings;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle.action;
|
||||
package org.elasticsearch.xpack.slm.action;
|
||||
|
||||
import org.elasticsearch.ResourceNotFoundException;
|
||||
import org.elasticsearch.action.ActionListener;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle.action;
|
||||
package org.elasticsearch.xpack.slm.action;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -26,8 +26,8 @@ import org.elasticsearch.xpack.core.snapshotlifecycle.SnapshotLifecycleMetadata;
|
|||
import org.elasticsearch.xpack.core.snapshotlifecycle.SnapshotLifecyclePolicyMetadata;
|
||||
import org.elasticsearch.xpack.core.snapshotlifecycle.action.ExecuteSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.core.snapshotlifecycle.history.SnapshotHistoryStore;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleService;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleTask;
|
||||
import org.elasticsearch.xpack.slm.SnapshotLifecycleService;
|
||||
import org.elasticsearch.xpack.slm.SnapshotLifecycleTask;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle.action;
|
||||
package org.elasticsearch.xpack.slm.action;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle.action;
|
||||
package org.elasticsearch.xpack.slm.action;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -29,7 +29,7 @@ import org.elasticsearch.xpack.core.indexlifecycle.OperationMode;
|
|||
import org.elasticsearch.xpack.core.snapshotlifecycle.SnapshotLifecycleMetadata;
|
||||
import org.elasticsearch.xpack.core.snapshotlifecycle.SnapshotLifecyclePolicyMetadata;
|
||||
import org.elasticsearch.xpack.core.snapshotlifecycle.action.PutSnapshotLifecycleAction;
|
||||
import org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleService;
|
||||
import org.elasticsearch.xpack.slm.SnapshotLifecycleService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.Instant;
|
|
@ -7,14 +7,14 @@
|
|||
/**
|
||||
* This package contains all the SLM Rest and Transport actions.
|
||||
*
|
||||
* <p>The {@link org.elasticsearch.xpack.snapshotlifecycle.action.TransportPutSnapshotLifecycleAction} creates or updates a snapshot
|
||||
* lifecycle policy in the cluster state. The {@link org.elasticsearch.xpack.snapshotlifecycle.action.TransportGetSnapshotLifecycleAction}
|
||||
* simply retrieves a policy by id. The {@link org.elasticsearch.xpack.snapshotlifecycle.action.TransportDeleteSnapshotLifecycleAction}
|
||||
* <p>The {@link org.elasticsearch.xpack.slm.action.TransportPutSnapshotLifecycleAction} creates or updates a snapshot
|
||||
* lifecycle policy in the cluster state. The {@link org.elasticsearch.xpack.slm.action.TransportGetSnapshotLifecycleAction}
|
||||
* simply retrieves a policy by id. The {@link org.elasticsearch.xpack.slm.action.TransportDeleteSnapshotLifecycleAction}
|
||||
* removes a policy from the cluster state. These actions only interact with the cluster state. Most of the logic that take place in
|
||||
* response to these actions happens on the master node in the {@link org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleService}.
|
||||
* response to these actions happens on the master node in the {@link org.elasticsearch.xpack.slm.SnapshotLifecycleService}.
|
||||
*
|
||||
* <p>The {@link org.elasticsearch.xpack.snapshotlifecycle.action.TransportExecuteSnapshotLifecycleAction} operates as if the snapshot
|
||||
* <p>The {@link org.elasticsearch.xpack.slm.action.TransportExecuteSnapshotLifecycleAction} operates as if the snapshot
|
||||
* policy given was immediately triggered by the scheduler. It does not interfere with any currently scheduled operations, it just runs
|
||||
* the snapshot operation ad hoc.
|
||||
*/
|
||||
package org.elasticsearch.xpack.snapshotlifecycle.action;
|
||||
package org.elasticsearch.xpack.slm.action;
|
|
@ -8,30 +8,30 @@
|
|||
* This is the Snapshot Lifecycle Management (SLM) main package. SLM is part of the wider ILM feature, reusing quite a bit of the
|
||||
* functionality for itself in some places, which is why the two features are contained in the same plugin.
|
||||
*
|
||||
* This package contains the {@link org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleService} and
|
||||
* {@link org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleTask}, as well as the Rest and Transport actions for the
|
||||
* This package contains the {@link org.elasticsearch.xpack.slm.SnapshotLifecycleService} and
|
||||
* {@link org.elasticsearch.xpack.slm.SnapshotLifecycleTask}, as well as the Rest and Transport actions for the
|
||||
* feature set.
|
||||
* This package contains the primary execution logic and most of the user facing
|
||||
* surface area for the plugin, but not everything. The model objects for the cluster state as well as several supporting classes are
|
||||
* contained in the {@link org.elasticsearch.xpack.core.snapshotlifecycle} package.
|
||||
*
|
||||
* <p>{@link org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleService} maintains an internal
|
||||
* <p>{@link org.elasticsearch.xpack.slm.SnapshotLifecycleService} maintains an internal
|
||||
* {@link org.elasticsearch.xpack.core.scheduler.SchedulerEngine SchedulerEngine} that handles scheduling snapshots. The service
|
||||
* executes on the currently elected master node. It listens to the cluster state, detecting new policies to schedule, and unscheduling
|
||||
* policies when they are deleted or if ILM is stopped. The bulk of this scheduling management is handled within
|
||||
* {@link org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleService#maybeScheduleSnapshot(SnapshotLifecyclePolicyMetadata)}
|
||||
* {@link org.elasticsearch.xpack.slm.SnapshotLifecycleService#maybeScheduleSnapshot(SnapshotLifecyclePolicyMetadata)}
|
||||
* which is executed on all snapshot policies each update.
|
||||
*
|
||||
* <p>The {@link org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleTask} object is what receives an event when a scheduled policy
|
||||
* <p>The {@link org.elasticsearch.xpack.slm.SnapshotLifecycleTask} object is what receives an event when a scheduled policy
|
||||
* is triggered for execution. It constructs a snapshot request and runs it as the user who originally set up the policy. The bulk of this
|
||||
* logic is contained in the
|
||||
* {@link org.elasticsearch.xpack.snapshotlifecycle.SnapshotLifecycleTask#maybeTakeSnapshot(String, Client, ClusterService,
|
||||
* {@link org.elasticsearch.xpack.slm.SnapshotLifecycleTask#maybeTakeSnapshot(String, Client, ClusterService,
|
||||
* SnapshotHistoryStore)} method. After a snapshot request has been submitted, it persists the result (success or failure) in a history
|
||||
* store (an index), caching the latest success and failure information in the cluster state. It is important to note that this task
|
||||
* fires the snapshot request off and forgets it; It does not wait until the entire snapshot completes. Any success or failure that this
|
||||
* task sees will be from the initial submission of the snapshot request only.
|
||||
*/
|
||||
package org.elasticsearch.xpack.snapshotlifecycle;
|
||||
package org.elasticsearch.xpack.slm;
|
||||
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle;
|
||||
package org.elasticsearch.xpack.slm;
|
||||
|
||||
import org.elasticsearch.common.ValidationException;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle;
|
||||
package org.elasticsearch.xpack.slm;
|
||||
|
||||
import org.elasticsearch.cluster.ClusterChangedEvent;
|
||||
import org.elasticsearch.cluster.ClusterName;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.snapshotlifecycle;
|
||||
package org.elasticsearch.xpack.slm;
|
||||
|
||||
import org.apache.lucene.util.SetOnce;
|
||||
import org.elasticsearch.Version;
|
Loading…
Reference in New Issue