public class GatewayMetaState extends AbstractComponent implements ClusterStateListener
Modifier and Type | Class and Description |
---|---|
static class |
GatewayMetaState.IndexMetaWriteInfo |
deprecationLogger, logger, settings
Constructor and Description |
---|
GatewayMetaState(Settings settings,
NodeEnvironment nodeEnv,
MetaStateService metaStateService,
DanglingIndicesState danglingIndicesState,
TransportNodesListGatewayMetaState nodesListGatewayMetaState,
MetaDataIndexUpgradeService metaDataIndexUpgradeService) |
Modifier and Type | Method and Description |
---|---|
void |
clusterChanged(ClusterChangedEvent event)
Called when cluster state changes.
|
static Set<String> |
getRelevantIndices(ClusterState state,
ClusterState previousState,
com.google.common.collect.ImmutableSet<String> previouslyWrittenIndices) |
static Set<String> |
getRelevantIndicesForMasterEligibleNode(ClusterState state) |
static Set<String> |
getRelevantIndicesOnDataOnlyNode(ClusterState state,
ClusterState previousState,
com.google.common.collect.ImmutableSet<String> previouslyWrittenIndices) |
protected static boolean |
isDataOnlyNode(ClusterState state) |
MetaData |
loadMetaState() |
static Iterable<GatewayMetaState.IndexMetaWriteInfo> |
resolveStatesToBeWritten(com.google.common.collect.ImmutableSet<String> previouslyWrittenIndices,
Set<String> potentiallyUnwrittenIndices,
MetaData previousMetaData,
MetaData newMetaData)
Loads the current meta state for each index in the new cluster state and checks if it has to be persisted.
|
logDeprecatedSetting, logRemovedSetting, nodeName
@Inject public GatewayMetaState(Settings settings, NodeEnvironment nodeEnv, MetaStateService metaStateService, DanglingIndicesState danglingIndicesState, TransportNodesListGatewayMetaState nodesListGatewayMetaState, MetaDataIndexUpgradeService metaDataIndexUpgradeService) throws Exception
Exception
public void clusterChanged(ClusterChangedEvent event)
ClusterStateListener
clusterChanged
in interface ClusterStateListener
public static Set<String> getRelevantIndices(ClusterState state, ClusterState previousState, com.google.common.collect.ImmutableSet<String> previouslyWrittenIndices)
protected static boolean isDataOnlyNode(ClusterState state)
public static Iterable<GatewayMetaState.IndexMetaWriteInfo> resolveStatesToBeWritten(com.google.common.collect.ImmutableSet<String> previouslyWrittenIndices, Set<String> potentiallyUnwrittenIndices, MetaData previousMetaData, MetaData newMetaData)
previouslyWrittenIndices
- A list of indices for which the state was already written beforepotentiallyUnwrittenIndices
- The list of indices for which state should potentially be writtenpreviousMetaData
- The last meta data we know of. meta data for all indices in previouslyWrittenIndices list is persisted nownewMetaData
- The new metadatapublic static Set<String> getRelevantIndicesOnDataOnlyNode(ClusterState state, ClusterState previousState, com.google.common.collect.ImmutableSet<String> previouslyWrittenIndices)
public static Set<String> getRelevantIndicesForMasterEligibleNode(ClusterState state)
Copyright © 2009–2016. All rights reserved.