Class GatewayMetaState

    • Method Detail

      • loadMetaState

        public MetaData loadMetaState()
      • getRelevantIndices

        public static java.util.Set<Index> getRelevantIndices​(ClusterState state,
                                                              ClusterState previousState,
                                                              java.util.Set<Index> previouslyWrittenIndices)
      • isDataOnlyNode

        protected static boolean isDataOnlyNode​(ClusterState state)
      • resolveStatesToBeWritten

        public static java.lang.Iterable<GatewayMetaState.IndexMetaWriteInfo> resolveStatesToBeWritten​(java.util.Set<Index> previouslyWrittenIndices,
                                                                                                       java.util.Set<Index> 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. Each index state that should be written to disk will be returned. This is only run for data only nodes. It will return only the states for indices that actually have a shard allocated on the current node.
        previouslyWrittenIndices - A list of indices for which the state was already written before
        potentiallyUnwrittenIndices - The list of indices for which state should potentially be written
        previousMetaData - The last meta data we know of. meta data for all indices in previouslyWrittenIndices list is persisted now
        newMetaData - The new metadata
        iterable over all indices states that should be written to disk
      • getRelevantIndicesOnDataOnlyNode

        public static java.util.Set<Index> getRelevantIndicesOnDataOnlyNode​(ClusterState state,
                                                                            ClusterState previousState,
                                                                            java.util.Set<Index> previouslyWrittenIndices)
      • getRelevantIndicesForMasterEligibleNode

        public static java.util.Set<Index> getRelevantIndicesForMasterEligibleNode​(ClusterState state)