Package org.elasticsearch.gateway
Class DanglingIndicesState
java.lang.Object
org.elasticsearch.gateway.DanglingIndicesState
- All Implemented Interfaces:
ClusterStateListener
public class DanglingIndicesState extends java.lang.Object implements ClusterStateListener
The dangling indices state is responsible for finding new dangling indices (indices that have
their state written on disk, but don't exists in the metadata of the cluster), and importing
them into the cluster.
-
Field Summary
Fields Modifier and Type Field Description static Setting<java.lang.Boolean>
AUTO_IMPORT_DANGLING_INDICES_SETTING
-
Constructor Summary
Constructors Constructor Description DanglingIndicesState(NodeEnvironment nodeEnv, MetaStateService metaStateService, LocalAllocateDangledIndices allocateDangledIndices, ClusterService clusterService)
-
Method Summary
Modifier and Type Method Description void
clusterChanged(ClusterChangedEvent event)
Called when cluster state changes.void
processDanglingIndices(MetaData metaData)
Process dangling indices based on the provided meta data, handling cleanup, finding new dangling indices, and allocating outstanding ones.
-
Field Details
-
Constructor Details
-
DanglingIndicesState
@Inject public DanglingIndicesState(NodeEnvironment nodeEnv, MetaStateService metaStateService, LocalAllocateDangledIndices allocateDangledIndices, ClusterService clusterService)
-
-
Method Details
-
processDanglingIndices
Process dangling indices based on the provided meta data, handling cleanup, finding new dangling indices, and allocating outstanding ones. -
clusterChanged
Description copied from interface:ClusterStateListener
Called when cluster state changes.- Specified by:
clusterChanged
in interfaceClusterStateListener
-