Search in sources :

Example 1 with NotMasterException

use of org.opensearch.cluster.NotMasterException in project OpenSearch by opensearch-project.

the class JoinTaskExecutor method execute.

@Override
public ClusterTasksResult<Task> execute(ClusterState currentState, List<Task> joiningNodes) throws Exception {
    final ClusterTasksResult.Builder<Task> results = ClusterTasksResult.builder();
    final DiscoveryNodes currentNodes = currentState.nodes();
    boolean nodesChanged = false;
    ClusterState.Builder newState;
    if (joiningNodes.size() == 1 && joiningNodes.get(0).isFinishElectionTask()) {
        return results.successes(joiningNodes).build(currentState);
    } else if (currentNodes.getMasterNode() == null && joiningNodes.stream().anyMatch(Task::isBecomeMasterTask)) {
        assert joiningNodes.stream().anyMatch(Task::isFinishElectionTask) : "becoming a master but election is not finished " + joiningNodes;
        // use these joins to try and become the master.
        // Note that we don't have to do any validation of the amount of joining nodes - the commit
        // during the cluster state publishing guarantees that we have enough
        newState = becomeMasterAndTrimConflictingNodes(currentState, joiningNodes);
        nodesChanged = true;
    } else if (currentNodes.isLocalNodeElectedMaster() == false) {
        logger.trace("processing node joins, but we are not the master. current master: {}", currentNodes.getMasterNode());
        throw new NotMasterException("Node [" + currentNodes.getLocalNode() + "] not master for join request");
    } else {
        newState = ClusterState.builder(currentState);
    }
    DiscoveryNodes.Builder nodesBuilder = DiscoveryNodes.builder(newState.nodes());
    assert nodesBuilder.isLocalNodeElectedMaster();
    Version minClusterNodeVersion = newState.nodes().getMinNodeVersion();
    Version maxClusterNodeVersion = newState.nodes().getMaxNodeVersion();
    // we only enforce major version transitions on a fully formed clusters
    final boolean enforceMajorVersion = currentState.getBlocks().hasGlobalBlock(STATE_NOT_RECOVERED_BLOCK) == false;
    // processing any joins
    Map<String, String> joiniedNodeNameIds = new HashMap<>();
    for (final Task joinTask : joiningNodes) {
        if (joinTask.isBecomeMasterTask() || joinTask.isFinishElectionTask()) {
        // noop
        } else if (currentNodes.nodeExistsWithSameRoles(joinTask.node()) && !currentNodes.nodeExistsWithBWCVersion(joinTask.node())) {
            logger.debug("received a join request for an existing node [{}]", joinTask.node());
        } else {
            final DiscoveryNode node = joinTask.node();
            try {
                if (enforceMajorVersion) {
                    ensureMajorVersionBarrier(node.getVersion(), minClusterNodeVersion);
                }
                ensureNodesCompatibility(node.getVersion(), minClusterNodeVersion, maxClusterNodeVersion);
                // we do this validation quite late to prevent race conditions between nodes joining and importing dangling indices
                // we have to reject nodes that don't support all indices we have in this cluster
                ensureIndexCompatibility(node.getVersion(), currentState.getMetadata());
                nodesBuilder.add(node);
                nodesChanged = true;
                minClusterNodeVersion = Version.min(minClusterNodeVersion, node.getVersion());
                maxClusterNodeVersion = Version.max(maxClusterNodeVersion, node.getVersion());
                if (node.isMasterNode()) {
                    joiniedNodeNameIds.put(node.getName(), node.getId());
                }
            } catch (IllegalArgumentException | IllegalStateException e) {
                results.failure(joinTask, e);
                continue;
            }
        }
        results.success(joinTask);
    }
    if (nodesChanged) {
        rerouteService.reroute("post-join reroute", Priority.HIGH, ActionListener.wrap(r -> logger.trace("post-join reroute completed"), e -> logger.debug("post-join reroute failed", e)));
        if (joiniedNodeNameIds.isEmpty() == false) {
            Set<CoordinationMetadata.VotingConfigExclusion> currentVotingConfigExclusions = currentState.getVotingConfigExclusions();
            Set<CoordinationMetadata.VotingConfigExclusion> newVotingConfigExclusions = currentVotingConfigExclusions.stream().map(e -> {
                // Update nodeId in VotingConfigExclusion when a new node with excluded node name joins
                if (CoordinationMetadata.VotingConfigExclusion.MISSING_VALUE_MARKER.equals(e.getNodeId()) && joiniedNodeNameIds.containsKey(e.getNodeName())) {
                    return new CoordinationMetadata.VotingConfigExclusion(joiniedNodeNameIds.get(e.getNodeName()), e.getNodeName());
                } else {
                    return e;
                }
            }).collect(Collectors.toSet());
            // if VotingConfigExclusions did get updated
            if (newVotingConfigExclusions.equals(currentVotingConfigExclusions) == false) {
                CoordinationMetadata.Builder coordMetadataBuilder = CoordinationMetadata.builder(currentState.coordinationMetadata()).clearVotingConfigExclusions();
                newVotingConfigExclusions.forEach(coordMetadataBuilder::addVotingConfigExclusion);
                Metadata newMetadata = Metadata.builder(currentState.metadata()).coordinationMetadata(coordMetadataBuilder.build()).build();
                return results.build(allocationService.adaptAutoExpandReplicas(newState.nodes(nodesBuilder).metadata(newMetadata).build()));
            }
        }
        return results.build(allocationService.adaptAutoExpandReplicas(newState.nodes(nodesBuilder).build()));
    } else {
        // for the joining node to finalize its join and set us as a master
        return results.build(newState.build());
    }
}
Also used : DiscoveryNodes(org.opensearch.cluster.node.DiscoveryNodes) Metadata(org.opensearch.cluster.metadata.Metadata) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) STATE_NOT_RECOVERED_BLOCK(org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK) AllocationService(org.opensearch.cluster.routing.allocation.AllocationService) Version(org.opensearch.Version) Priority(org.opensearch.common.Priority) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ClusterState(org.opensearch.cluster.ClusterState) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) LegacyESVersion(org.opensearch.LegacyESVersion) Map(java.util.Map) NotMasterException(org.opensearch.cluster.NotMasterException) RerouteService(org.opensearch.cluster.routing.RerouteService) BiConsumer(java.util.function.BiConsumer) ActionListener(org.opensearch.action.ActionListener) ClusterBlocks(org.opensearch.cluster.block.ClusterBlocks) Collection(java.util.Collection) PersistentTasksCustomMetadata(org.opensearch.persistent.PersistentTasksCustomMetadata) Set(java.util.Set) ClusterStateTaskExecutor(org.opensearch.cluster.ClusterStateTaskExecutor) Settings(org.opensearch.common.settings.Settings) TransportService(org.opensearch.transport.TransportService) Collectors(java.util.stream.Collectors) List(java.util.List) Logger(org.apache.logging.log4j.Logger) Collections(java.util.Collections) ClusterState(org.opensearch.cluster.ClusterState) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) HashMap(java.util.HashMap) Metadata(org.opensearch.cluster.metadata.Metadata) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) PersistentTasksCustomMetadata(org.opensearch.persistent.PersistentTasksCustomMetadata) Version(org.opensearch.Version) LegacyESVersion(org.opensearch.LegacyESVersion) NotMasterException(org.opensearch.cluster.NotMasterException) DiscoveryNodes(org.opensearch.cluster.node.DiscoveryNodes)

Example 2 with NotMasterException

use of org.opensearch.cluster.NotMasterException in project OpenSearch by opensearch-project.

the class BatchedRerouteService method reroute.

/**
 * Initiates a reroute.
 */
@Override
public final void reroute(String reason, Priority priority, ActionListener<ClusterState> listener) {
    final List<ActionListener<ClusterState>> currentListeners;
    synchronized (mutex) {
        if (pendingRerouteListeners != null) {
            if (priority.sameOrAfter(pendingTaskPriority)) {
                logger.trace("already has pending reroute at priority [{}], adding [{}] with priority [{}] to batch", pendingTaskPriority, reason, priority);
                pendingRerouteListeners.add(listener);
                return;
            } else {
                logger.trace("already has pending reroute at priority [{}], promoting batch to [{}] and adding [{}]", pendingTaskPriority, priority, reason);
                currentListeners = new ArrayList<>(1 + pendingRerouteListeners.size());
                currentListeners.add(listener);
                currentListeners.addAll(pendingRerouteListeners);
                pendingRerouteListeners.clear();
                pendingRerouteListeners = currentListeners;
                pendingTaskPriority = priority;
            }
        } else {
            logger.trace("no pending reroute, scheduling reroute [{}] at priority [{}]", reason, priority);
            currentListeners = new ArrayList<>(1);
            currentListeners.add(listener);
            pendingRerouteListeners = currentListeners;
            pendingTaskPriority = priority;
        }
    }
    try {
        clusterService.submitStateUpdateTask(CLUSTER_UPDATE_TASK_SOURCE + "(" + reason + ")", new ClusterStateUpdateTask(priority) {

            @Override
            public ClusterState execute(ClusterState currentState) {
                final boolean currentListenersArePending;
                synchronized (mutex) {
                    assert currentListeners.isEmpty() == (pendingRerouteListeners != currentListeners) : "currentListeners=" + currentListeners + ", pendingRerouteListeners=" + pendingRerouteListeners;
                    currentListenersArePending = pendingRerouteListeners == currentListeners;
                    if (currentListenersArePending) {
                        pendingRerouteListeners = null;
                    }
                }
                if (currentListenersArePending) {
                    logger.trace("performing batched reroute [{}]", reason);
                    return reroute.apply(currentState, reason);
                } else {
                    logger.trace("batched reroute [{}] was promoted", reason);
                    return currentState;
                }
            }

            @Override
            public void onNoLongerMaster(String source) {
                synchronized (mutex) {
                    if (pendingRerouteListeners == currentListeners) {
                        pendingRerouteListeners = null;
                    }
                }
                ActionListener.onFailure(currentListeners, new NotMasterException("delayed reroute [" + reason + "] cancelled"));
            // no big deal, the new master will reroute again
            }

            @Override
            public void onFailure(String source, Exception e) {
                synchronized (mutex) {
                    if (pendingRerouteListeners == currentListeners) {
                        pendingRerouteListeners = null;
                    }
                }
                final ClusterState state = clusterService.state();
                if (logger.isTraceEnabled()) {
                    logger.error(() -> new ParameterizedMessage("unexpected failure during [{}], current state:\n{}", source, state), e);
                } else {
                    logger.error(() -> new ParameterizedMessage("unexpected failure during [{}], current state version [{}]", source, state.version()), e);
                }
                ActionListener.onFailure(currentListeners, new OpenSearchException("delayed reroute [" + reason + "] failed", e));
            }

            @Override
            public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
                ActionListener.onResponse(currentListeners, newState);
            }
        });
    } catch (Exception e) {
        synchronized (mutex) {
            assert currentListeners.isEmpty() == (pendingRerouteListeners != currentListeners);
            if (pendingRerouteListeners == currentListeners) {
                pendingRerouteListeners = null;
            }
        }
        ClusterState state = clusterService.state();
        logger.warn(() -> new ParameterizedMessage("failed to reroute routing table, current state:\n{}", state), e);
        ActionListener.onFailure(currentListeners, new OpenSearchException("delayed reroute [" + reason + "] could not be submitted", e));
    }
}
Also used : ClusterState(org.opensearch.cluster.ClusterState) ActionListener(org.opensearch.action.ActionListener) ClusterStateUpdateTask(org.opensearch.cluster.ClusterStateUpdateTask) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) OpenSearchException(org.opensearch.OpenSearchException) NotMasterException(org.opensearch.cluster.NotMasterException) OpenSearchException(org.opensearch.OpenSearchException) NotMasterException(org.opensearch.cluster.NotMasterException)

Example 3 with NotMasterException

use of org.opensearch.cluster.NotMasterException in project OpenSearch by opensearch-project.

the class TransportClusterHealthAction method waitForEventsAndExecuteHealth.

private void waitForEventsAndExecuteHealth(final ClusterHealthRequest request, final ActionListener<ClusterHealthResponse> listener, final int waitCount, final long endTimeRelativeMillis) {
    assert request.waitForEvents() != null;
    if (request.local()) {
        clusterService.submitStateUpdateTask("cluster_health (wait_for_events [" + request.waitForEvents() + "])", new LocalClusterUpdateTask(request.waitForEvents()) {

            @Override
            public ClusterTasksResult<LocalClusterUpdateTask> execute(ClusterState currentState) {
                return unchanged();
            }

            @Override
            public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
                final long timeoutInMillis = Math.max(0, endTimeRelativeMillis - threadPool.relativeTimeInMillis());
                final TimeValue newTimeout = TimeValue.timeValueMillis(timeoutInMillis);
                request.timeout(newTimeout);
                executeHealth(request, clusterService.state(), listener, waitCount, observedState -> waitForEventsAndExecuteHealth(request, listener, waitCount, endTimeRelativeMillis));
            }

            @Override
            public void onFailure(String source, Exception e) {
                logger.error(() -> new ParameterizedMessage("unexpected failure during [{}]", source), e);
                listener.onFailure(e);
            }
        });
    } else {
        final TimeValue taskTimeout = TimeValue.timeValueMillis(Math.max(0, endTimeRelativeMillis - threadPool.relativeTimeInMillis()));
        clusterService.submitStateUpdateTask("cluster_health (wait_for_events [" + request.waitForEvents() + "])", new ClusterStateUpdateTask(request.waitForEvents()) {

            @Override
            public ClusterState execute(ClusterState currentState) {
                return currentState;
            }

            @Override
            public TimeValue timeout() {
                return taskTimeout;
            }

            @Override
            public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
                final long timeoutInMillis = Math.max(0, endTimeRelativeMillis - threadPool.relativeTimeInMillis());
                final TimeValue newTimeout = TimeValue.timeValueMillis(timeoutInMillis);
                request.timeout(newTimeout);
                // we must use the state from the applier service, because if the state-not-recovered block is in place then the
                // applier service has a different view of the cluster state from the one supplied here
                final ClusterState appliedState = clusterService.state();
                assert newState.stateUUID().equals(appliedState.stateUUID()) : newState.stateUUID() + " vs " + appliedState.stateUUID();
                executeHealth(request, appliedState, listener, waitCount, observedState -> waitForEventsAndExecuteHealth(request, listener, waitCount, endTimeRelativeMillis));
            }

            @Override
            public void onNoLongerMaster(String source) {
                logger.trace("stopped being master while waiting for events with priority [{}]. retrying.", request.waitForEvents());
                // TransportMasterNodeAction implements the retry logic, which is triggered by passing a NotMasterException
                listener.onFailure(new NotMasterException("no longer master. source: [" + source + "]"));
            }

            @Override
            public void onFailure(String source, Exception e) {
                if (e instanceof ProcessClusterEventTimeoutException) {
                    listener.onResponse(getResponse(request, clusterService.state(), waitCount, TimeoutState.TIMED_OUT));
                } else {
                    logger.error(() -> new ParameterizedMessage("unexpected failure during [{}]", source), e);
                    listener.onFailure(e);
                }
            }
        });
    }
}
Also used : ThreadPool(org.opensearch.threadpool.ThreadPool) AllocationService(org.opensearch.cluster.routing.allocation.AllocationService) IndicesOptions(org.opensearch.action.support.IndicesOptions) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) Strings(org.opensearch.common.Strings) ClusterState(org.opensearch.cluster.ClusterState) NotMasterException(org.opensearch.cluster.NotMasterException) NodeClosedException(org.opensearch.node.NodeClosedException) Inject(org.opensearch.common.inject.Inject) ActionListener(org.opensearch.action.ActionListener) ClusterStateObserver(org.opensearch.cluster.ClusterStateObserver) UnassignedInfo(org.opensearch.cluster.routing.UnassignedInfo) ClusterHealthStatus(org.opensearch.cluster.health.ClusterHealthStatus) ProcessClusterEventTimeoutException(org.opensearch.cluster.metadata.ProcessClusterEventTimeoutException) StreamInput(org.opensearch.common.io.stream.StreamInput) TimeValue(org.opensearch.common.unit.TimeValue) CollectionUtils(org.opensearch.common.util.CollectionUtils) Predicate(java.util.function.Predicate) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) IOException(java.io.IOException) Task(org.opensearch.tasks.Task) TransportService(org.opensearch.transport.TransportService) ActiveShardCount(org.opensearch.action.support.ActiveShardCount) LocalClusterUpdateTask(org.opensearch.cluster.LocalClusterUpdateTask) Consumer(java.util.function.Consumer) ActionFilters(org.opensearch.action.support.ActionFilters) Logger(org.apache.logging.log4j.Logger) ClusterStateUpdateTask(org.opensearch.cluster.ClusterStateUpdateTask) ClusterService(org.opensearch.cluster.service.ClusterService) LogManager(org.apache.logging.log4j.LogManager) TransportMasterNodeReadAction(org.opensearch.action.support.master.TransportMasterNodeReadAction) IndexNameExpressionResolver(org.opensearch.cluster.metadata.IndexNameExpressionResolver) ClusterState(org.opensearch.cluster.ClusterState) LocalClusterUpdateTask(org.opensearch.cluster.LocalClusterUpdateTask) ProcessClusterEventTimeoutException(org.opensearch.cluster.metadata.ProcessClusterEventTimeoutException) ClusterStateUpdateTask(org.opensearch.cluster.ClusterStateUpdateTask) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) NotMasterException(org.opensearch.cluster.NotMasterException) TimeValue(org.opensearch.common.unit.TimeValue) NotMasterException(org.opensearch.cluster.NotMasterException) NodeClosedException(org.opensearch.node.NodeClosedException) ProcessClusterEventTimeoutException(org.opensearch.cluster.metadata.ProcessClusterEventTimeoutException) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) IOException(java.io.IOException)

Example 4 with NotMasterException

use of org.opensearch.cluster.NotMasterException in project OpenSearch by opensearch-project.

the class TransportClusterStateAction method masterOperation.

@Override
protected void masterOperation(final ClusterStateRequest request, final ClusterState state, final ActionListener<ClusterStateResponse> listener) throws IOException {
    final Predicate<ClusterState> acceptableClusterStatePredicate = request.waitForMetadataVersion() == null ? clusterState -> true : clusterState -> clusterState.metadata().version() >= request.waitForMetadataVersion();
    final Predicate<ClusterState> acceptableClusterStateOrNotMasterPredicate = request.local() ? acceptableClusterStatePredicate : acceptableClusterStatePredicate.or(clusterState -> clusterState.nodes().isLocalNodeElectedMaster() == false);
    if (acceptableClusterStatePredicate.test(state)) {
        ActionListener.completeWith(listener, () -> buildResponse(request, state));
    } else {
        assert acceptableClusterStateOrNotMasterPredicate.test(state) == false;
        new ClusterStateObserver(state, clusterService, request.waitForTimeout(), logger, threadPool.getThreadContext()).waitForNextChange(new ClusterStateObserver.Listener() {

            @Override
            public void onNewClusterState(ClusterState newState) {
                if (acceptableClusterStatePredicate.test(newState)) {
                    ActionListener.completeWith(listener, () -> buildResponse(request, newState));
                } else {
                    listener.onFailure(new NotMasterException("master stepped down waiting for metadata version " + request.waitForMetadataVersion()));
                }
            }

            @Override
            public void onClusterServiceClose() {
                listener.onFailure(new NodeClosedException(clusterService.localNode()));
            }

            @Override
            public void onTimeout(TimeValue timeout) {
                try {
                    listener.onResponse(new ClusterStateResponse(state.getClusterName(), null, true));
                } catch (Exception e) {
                    listener.onFailure(e);
                }
            }
        }, acceptableClusterStateOrNotMasterPredicate);
    }
}
Also used : StreamInput(org.opensearch.common.io.stream.StreamInput) TimeValue(org.opensearch.common.unit.TimeValue) Metadata(org.opensearch.cluster.metadata.Metadata) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) Predicate(java.util.function.Predicate) ThreadPool(org.opensearch.threadpool.ThreadPool) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) IOException(java.io.IOException) TransportService(org.opensearch.transport.TransportService) ObjectObjectCursor(com.carrotsearch.hppc.cursors.ObjectObjectCursor) ActionFilters(org.opensearch.action.support.ActionFilters) ClusterState(org.opensearch.cluster.ClusterState) Logger(org.apache.logging.log4j.Logger) NotMasterException(org.opensearch.cluster.NotMasterException) ClusterService(org.opensearch.cluster.service.ClusterService) NodeClosedException(org.opensearch.node.NodeClosedException) RoutingTable(org.opensearch.cluster.routing.RoutingTable) Inject(org.opensearch.common.inject.Inject) ActionListener(org.opensearch.action.ActionListener) ClusterStateObserver(org.opensearch.cluster.ClusterStateObserver) LogManager(org.apache.logging.log4j.LogManager) Custom(org.opensearch.cluster.metadata.Metadata.Custom) TransportMasterNodeReadAction(org.opensearch.action.support.master.TransportMasterNodeReadAction) IndexNameExpressionResolver(org.opensearch.cluster.metadata.IndexNameExpressionResolver) ClusterState(org.opensearch.cluster.ClusterState) ClusterStateObserver(org.opensearch.cluster.ClusterStateObserver) NodeClosedException(org.opensearch.node.NodeClosedException) NotMasterException(org.opensearch.cluster.NotMasterException) TimeValue(org.opensearch.common.unit.TimeValue) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) IOException(java.io.IOException) NotMasterException(org.opensearch.cluster.NotMasterException) NodeClosedException(org.opensearch.node.NodeClosedException)

Example 5 with NotMasterException

use of org.opensearch.cluster.NotMasterException in project OpenSearch by opensearch-project.

the class TransportMasterNodeActionTests method testMasterFailoverAfterStepDown.

public void testMasterFailoverAfterStepDown() throws ExecutionException, InterruptedException {
    Request request = new Request().masterNodeTimeout(TimeValue.timeValueHours(1));
    PlainActionFuture<Response> listener = new PlainActionFuture<>();
    final Response response = new Response();
    setState(clusterService, ClusterStateCreationUtils.state(localNode, localNode, allNodes));
    new Action("internal:testAction", transportService, clusterService, threadPool) {

        @Override
        protected void masterOperation(Request request, ClusterState state, ActionListener<Response> listener) throws Exception {
            // The other node has become master, simulate failures of this node while publishing cluster state through ZenDiscovery
            setState(clusterService, ClusterStateCreationUtils.state(localNode, remoteNode, allNodes));
            Exception failure = randomBoolean() ? new FailedToCommitClusterStateException("Fake error") : new NotMasterException("Fake error");
            listener.onFailure(failure);
        }
    }.execute(request, listener);
    assertThat(transport.capturedRequests().length, equalTo(1));
    CapturingTransport.CapturedRequest capturedRequest = transport.capturedRequests()[0];
    assertTrue(capturedRequest.node.isMasterNode());
    assertThat(capturedRequest.request, equalTo(request));
    assertThat(capturedRequest.action, equalTo("internal:testAction"));
    transport.handleResponse(capturedRequest.requestId, response);
    assertTrue(listener.isDone());
    assertThat(listener.get(), equalTo(response));
}
Also used : FailedToCommitClusterStateException(org.opensearch.cluster.coordination.FailedToCommitClusterStateException) ClusterState(org.opensearch.cluster.ClusterState) CapturingTransport(org.opensearch.test.transport.CapturingTransport) OpenSearchException(org.opensearch.OpenSearchException) NotMasterException(org.opensearch.cluster.NotMasterException) NodeClosedException(org.opensearch.node.NodeClosedException) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) FailedToCommitClusterStateException(org.opensearch.cluster.coordination.FailedToCommitClusterStateException) ConnectTransportException(org.opensearch.transport.ConnectTransportException) MasterNotDiscoveredException(org.opensearch.discovery.MasterNotDiscoveredException) ActionRequestValidationException(org.opensearch.action.ActionRequestValidationException) IOException(java.io.IOException) ExecutionException(java.util.concurrent.ExecutionException) ActionResponse(org.opensearch.action.ActionResponse) PlainActionFuture(org.opensearch.action.support.PlainActionFuture) NotMasterException(org.opensearch.cluster.NotMasterException)

Aggregations

NotMasterException (org.opensearch.cluster.NotMasterException)7 ClusterState (org.opensearch.cluster.ClusterState)6 ActionListener (org.opensearch.action.ActionListener)5 IOException (java.io.IOException)4 TransportService (org.opensearch.transport.TransportService)4 Predicate (java.util.function.Predicate)3 Logger (org.apache.logging.log4j.Logger)3 ClusterStateObserver (org.opensearch.cluster.ClusterStateObserver)3 ClusterBlockException (org.opensearch.cluster.block.ClusterBlockException)3 AllocationService (org.opensearch.cluster.routing.allocation.AllocationService)3 ClusterService (org.opensearch.cluster.service.ClusterService)3 StreamInput (org.opensearch.common.io.stream.StreamInput)3 NodeClosedException (org.opensearch.node.NodeClosedException)3 ThreadPool (org.opensearch.threadpool.ThreadPool)3 Collections (java.util.Collections)2 LogManager (org.apache.logging.log4j.LogManager)2 ParameterizedMessage (org.apache.logging.log4j.message.ParameterizedMessage)2 ActionFilters (org.opensearch.action.support.ActionFilters)2 TransportMasterNodeReadAction (org.opensearch.action.support.master.TransportMasterNodeReadAction)2 FailedToCommitClusterStateException (org.opensearch.cluster.coordination.FailedToCommitClusterStateException)2