Search in sources :

Example 1 with DiscoveryNodes

use of org.elasticsearch.cluster.node.DiscoveryNodes in project elasticsearch by elastic.

the class VerifyNodeRepositoryAction method verify.

public void verify(String repository, String verificationToken, final ActionListener<VerifyResponse> listener) {
    final DiscoveryNodes discoNodes = clusterService.state().nodes();
    final DiscoveryNode localNode = discoNodes.getLocalNode();
    final ObjectContainer<DiscoveryNode> masterAndDataNodes = discoNodes.getMasterAndDataNodes().values();
    final List<DiscoveryNode> nodes = new ArrayList<>();
    for (ObjectCursor<DiscoveryNode> cursor : masterAndDataNodes) {
        DiscoveryNode node = cursor.value;
        nodes.add(node);
    }
    final CopyOnWriteArrayList<VerificationFailure> errors = new CopyOnWriteArrayList<>();
    final AtomicInteger counter = new AtomicInteger(nodes.size());
    for (final DiscoveryNode node : nodes) {
        if (node.equals(localNode)) {
            try {
                doVerify(repository, verificationToken, localNode);
            } catch (Exception e) {
                logger.warn((Supplier<?>) () -> new ParameterizedMessage("[{}] failed to verify repository", repository), e);
                errors.add(new VerificationFailure(node.getId(), e));
            }
            if (counter.decrementAndGet() == 0) {
                finishVerification(listener, nodes, errors);
            }
        } else {
            transportService.sendRequest(node, ACTION_NAME, new VerifyNodeRepositoryRequest(repository, verificationToken), new EmptyTransportResponseHandler(ThreadPool.Names.SAME) {

                @Override
                public void handleResponse(TransportResponse.Empty response) {
                    if (counter.decrementAndGet() == 0) {
                        finishVerification(listener, nodes, errors);
                    }
                }

                @Override
                public void handleException(TransportException exp) {
                    errors.add(new VerificationFailure(node.getId(), exp));
                    if (counter.decrementAndGet() == 0) {
                        finishVerification(listener, nodes, errors);
                    }
                }
            });
        }
    }
}
Also used : DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) ArrayList(java.util.ArrayList) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) TransportResponse(org.elasticsearch.transport.TransportResponse) TransportException(org.elasticsearch.transport.TransportException) IOException(java.io.IOException) TransportException(org.elasticsearch.transport.TransportException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Supplier(org.apache.logging.log4j.util.Supplier) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) EmptyTransportResponseHandler(org.elasticsearch.transport.EmptyTransportResponseHandler) DiscoveryNodes(org.elasticsearch.cluster.node.DiscoveryNodes) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList)

Example 2 with DiscoveryNodes

use of org.elasticsearch.cluster.node.DiscoveryNodes in project elasticsearch by elastic.

the class TransportTasksActionTests method testTaskNodeFiltering.

/**
     * This test starts nodes actions that blocks on all nodes. While node actions are blocked in the middle of execution
     * it executes a tasks action that targets these blocked node actions. The test verifies that task actions are only
     * getting executed on nodes that are not listed in the node filter.
     */
public void testTaskNodeFiltering() throws ExecutionException, InterruptedException, IOException {
    setupTestNodes(Settings.EMPTY);
    connectNodes(testNodes);
    CountDownLatch checkLatch = new CountDownLatch(1);
    // Start some test nodes action so we could have something to run tasks actions on
    ActionFuture<NodesResponse> future = startBlockingTestNodesAction(checkLatch);
    String[] allNodes = new String[testNodes.length];
    for (int i = 0; i < testNodes.length; i++) {
        allNodes[i] = testNodes[i].getNodeId();
    }
    int filterNodesSize = randomInt(allNodes.length);
    Set<String> filterNodes = new HashSet<>(randomSubsetOf(filterNodesSize, allNodes));
    logger.info("Filtering out nodes {} size: {}", filterNodes, filterNodesSize);
    TestTasksAction[] tasksActions = new TestTasksAction[nodesCount];
    for (int i = 0; i < testNodes.length; i++) {
        final int node = i;
        // Simulate a task action that works on all nodes except nodes listed in filterNodes.
        // We are testing that it works.
        tasksActions[i] = new TestTasksAction(CLUSTER_SETTINGS, "testTasksAction", threadPool, testNodes[i].clusterService, testNodes[i].transportService) {

            @Override
            protected String[] filterNodeIds(DiscoveryNodes nodes, String[] nodesIds) {
                String[] superNodes = super.filterNodeIds(nodes, nodesIds);
                List<String> filteredNodes = new ArrayList<>();
                for (String node : superNodes) {
                    if (filterNodes.contains(node) == false) {
                        filteredNodes.add(node);
                    }
                }
                return filteredNodes.toArray(new String[filteredNodes.size()]);
            }

            @Override
            protected void taskOperation(TestTasksRequest request, Task task, ActionListener<TestTaskResponse> listener) {
                if (randomBoolean()) {
                    listener.onResponse(new TestTaskResponse(testNodes[node].getNodeId()));
                } else {
                    threadPool.generic().execute(() -> listener.onResponse(new TestTaskResponse(testNodes[node].getNodeId())));
                }
            }
        };
    }
    // Run task action on node tasks that are currently running
    // should be successful on all nodes except nodes that we filtered out
    TestTasksRequest testTasksRequest = new TestTasksRequest();
    // pick all test actions
    testTasksRequest.setActions("testAction[n]");
    TestTasksResponse response = tasksActions[randomIntBetween(0, nodesCount - 1)].execute(testTasksRequest).get();
    // Get successful responses from all nodes except nodes that we filtered out
    assertEquals(testNodes.length - filterNodes.size(), response.tasks.size());
    // no task failed
    assertEquals(0, response.getTaskFailures().size());
    // no nodes failed
    assertEquals(0, response.getNodeFailures().size());
    // Make sure that filtered nodes didn't send any responses
    for (TestTaskResponse taskResponse : response.tasks) {
        String nodeId = taskResponse.getStatus();
        assertFalse("Found response from filtered node " + nodeId, filterNodes.contains(nodeId));
    }
    // Release all node tasks and wait for response
    checkLatch.countDown();
    NodesResponse responses = future.get();
    assertEquals(0, responses.failureCount());
}
Also used : Task(org.elasticsearch.tasks.Task) Matchers.containsString(org.hamcrest.Matchers.containsString) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) ArrayList(java.util.ArrayList) DiscoveryNodes(org.elasticsearch.cluster.node.DiscoveryNodes) HashSet(java.util.HashSet)

Example 3 with DiscoveryNodes

use of org.elasticsearch.cluster.node.DiscoveryNodes in project elasticsearch by elastic.

the class AddIncrementallyTests method removeNodes.

private ClusterState removeNodes(ClusterState clusterState, AllocationService service, int numNodes) {
    logger.info("Removing [{}] nodes", numNodes);
    DiscoveryNodes.Builder nodes = DiscoveryNodes.builder(clusterState.nodes());
    ArrayList<DiscoveryNode> discoveryNodes = CollectionUtils.iterableAsArrayList(clusterState.nodes());
    Collections.shuffle(discoveryNodes, random());
    for (DiscoveryNode node : discoveryNodes) {
        nodes.remove(node.getId());
        numNodes--;
        if (numNodes <= 0) {
            break;
        }
    }
    clusterState = ClusterState.builder(clusterState).nodes(nodes.build()).build();
    clusterState = service.deassociateDeadNodes(clusterState, true, "reroute");
    logger.info("start all the primary shards, replicas will start initializing");
    RoutingNodes routingNodes = clusterState.getRoutingNodes();
    clusterState = service.applyStartedShards(clusterState, routingNodes.shardsWithState(INITIALIZING));
    logger.info("start the replica shards");
    routingNodes = clusterState.getRoutingNodes();
    clusterState = service.applyStartedShards(clusterState, routingNodes.shardsWithState(INITIALIZING));
    logger.info("rebalancing");
    clusterState = service.reroute(clusterState, "reroute");
    logger.info("complete rebalancing");
    clusterState = applyStartedShardsUntilNoChange(clusterState, service);
    return clusterState;
}
Also used : DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) RoutingNodes(org.elasticsearch.cluster.routing.RoutingNodes) DiscoveryNodes(org.elasticsearch.cluster.node.DiscoveryNodes)

Example 4 with DiscoveryNodes

use of org.elasticsearch.cluster.node.DiscoveryNodes in project elasticsearch by elastic.

the class IndicesClusterStateServiceRandomUpdatesTests method randomlyUpdateClusterState.

public ClusterState randomlyUpdateClusterState(ClusterState state, Map<DiscoveryNode, IndicesClusterStateService> clusterStateServiceMap, Supplier<MockIndicesService> indicesServiceSupplier) {
    // randomly create new indices (until we have 200 max)
    for (int i = 0; i < randomInt(5); i++) {
        if (state.metaData().indices().size() > 200) {
            break;
        }
        String name = "index_" + randomAsciiOfLength(15).toLowerCase(Locale.ROOT);
        Settings.Builder settingsBuilder = Settings.builder().put(SETTING_NUMBER_OF_SHARDS, randomIntBetween(1, 3)).put(SETTING_NUMBER_OF_REPLICAS, randomInt(2));
        if (randomBoolean()) {
            settingsBuilder.put(IndexMetaData.SETTING_SHADOW_REPLICAS, true).put(IndexMetaData.SETTING_SHARED_FILESYSTEM, true);
        }
        CreateIndexRequest request = new CreateIndexRequest(name, settingsBuilder.build()).waitForActiveShards(ActiveShardCount.NONE);
        state = cluster.createIndex(state, request);
        assertTrue(state.metaData().hasIndex(name));
    }
    // randomly delete indices
    Set<String> indicesToDelete = new HashSet<>();
    int numberOfIndicesToDelete = randomInt(Math.min(2, state.metaData().indices().size()));
    for (String index : randomSubsetOf(numberOfIndicesToDelete, state.metaData().indices().keys().toArray(String.class))) {
        indicesToDelete.add(state.metaData().index(index).getIndex().getName());
    }
    if (indicesToDelete.isEmpty() == false) {
        DeleteIndexRequest deleteRequest = new DeleteIndexRequest(indicesToDelete.toArray(new String[indicesToDelete.size()]));
        state = cluster.deleteIndices(state, deleteRequest);
        for (String index : indicesToDelete) {
            assertFalse(state.metaData().hasIndex(index));
        }
    }
    // randomly close indices
    int numberOfIndicesToClose = randomInt(Math.min(1, state.metaData().indices().size()));
    for (String index : randomSubsetOf(numberOfIndicesToClose, state.metaData().indices().keys().toArray(String.class))) {
        CloseIndexRequest closeIndexRequest = new CloseIndexRequest(state.metaData().index(index).getIndex().getName());
        state = cluster.closeIndices(state, closeIndexRequest);
    }
    // randomly open indices
    int numberOfIndicesToOpen = randomInt(Math.min(1, state.metaData().indices().size()));
    for (String index : randomSubsetOf(numberOfIndicesToOpen, state.metaData().indices().keys().toArray(String.class))) {
        OpenIndexRequest openIndexRequest = new OpenIndexRequest(state.metaData().index(index).getIndex().getName());
        state = cluster.openIndices(state, openIndexRequest);
    }
    // randomly update settings
    Set<String> indicesToUpdate = new HashSet<>();
    boolean containsClosedIndex = false;
    int numberOfIndicesToUpdate = randomInt(Math.min(2, state.metaData().indices().size()));
    for (String index : randomSubsetOf(numberOfIndicesToUpdate, state.metaData().indices().keys().toArray(String.class))) {
        indicesToUpdate.add(state.metaData().index(index).getIndex().getName());
        if (state.metaData().index(index).getState() == IndexMetaData.State.CLOSE) {
            containsClosedIndex = true;
        }
    }
    if (indicesToUpdate.isEmpty() == false) {
        UpdateSettingsRequest updateSettingsRequest = new UpdateSettingsRequest(indicesToUpdate.toArray(new String[indicesToUpdate.size()]));
        Settings.Builder settings = Settings.builder();
        if (containsClosedIndex == false) {
            settings.put(SETTING_NUMBER_OF_REPLICAS, randomInt(2));
        }
        settings.put("index.refresh_interval", randomIntBetween(1, 5) + "s");
        updateSettingsRequest.settings(settings.build());
        state = cluster.updateSettings(state, updateSettingsRequest);
    }
    // randomly reroute
    if (rarely()) {
        state = cluster.reroute(state, new ClusterRerouteRequest());
    }
    // randomly start and fail allocated shards
    List<ShardRouting> startedShards = new ArrayList<>();
    List<FailedShard> failedShards = new ArrayList<>();
    for (DiscoveryNode node : state.nodes()) {
        IndicesClusterStateService indicesClusterStateService = clusterStateServiceMap.get(node);
        MockIndicesService indicesService = (MockIndicesService) indicesClusterStateService.indicesService;
        for (MockIndexService indexService : indicesService) {
            for (MockIndexShard indexShard : indexService) {
                ShardRouting persistedShardRouting = indexShard.routingEntry();
                if (persistedShardRouting.initializing() && randomBoolean()) {
                    startedShards.add(persistedShardRouting);
                } else if (rarely()) {
                    failedShards.add(new FailedShard(persistedShardRouting, "fake shard failure", new Exception()));
                }
            }
        }
    }
    state = cluster.applyFailedShards(state, failedShards);
    state = cluster.applyStartedShards(state, startedShards);
    // randomly add and remove nodes (except current master)
    if (rarely()) {
        if (randomBoolean()) {
            // add node
            if (state.nodes().getSize() < 10) {
                DiscoveryNodes newNodes = DiscoveryNodes.builder(state.nodes()).add(createNode()).build();
                state = ClusterState.builder(state).nodes(newNodes).build();
                // always reroute after node leave
                state = cluster.reroute(state, new ClusterRerouteRequest());
                updateNodes(state, clusterStateServiceMap, indicesServiceSupplier);
            }
        } else {
            // remove node
            if (state.nodes().getDataNodes().size() > 3) {
                DiscoveryNode discoveryNode = randomFrom(state.nodes().getNodes().values().toArray(DiscoveryNode.class));
                if (discoveryNode.equals(state.nodes().getMasterNode()) == false) {
                    DiscoveryNodes newNodes = DiscoveryNodes.builder(state.nodes()).remove(discoveryNode.getId()).build();
                    state = ClusterState.builder(state).nodes(newNodes).build();
                    state = cluster.deassociateDeadNodes(state, true, "removed and added a node");
                    updateNodes(state, clusterStateServiceMap, indicesServiceSupplier);
                }
                if (randomBoolean()) {
                    // and add it back
                    DiscoveryNodes newNodes = DiscoveryNodes.builder(state.nodes()).add(discoveryNode).build();
                    state = ClusterState.builder(state).nodes(newNodes).build();
                    state = cluster.reroute(state, new ClusterRerouteRequest());
                    updateNodes(state, clusterStateServiceMap, indicesServiceSupplier);
                }
            }
        }
    }
    return state;
}
Also used : DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) UpdateSettingsRequest(org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest) ArrayList(java.util.ArrayList) DeleteIndexRequest(org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest) ClusterRerouteRequest(org.elasticsearch.action.admin.cluster.reroute.ClusterRerouteRequest) Settings(org.elasticsearch.common.settings.Settings) DiscoveryNodes(org.elasticsearch.cluster.node.DiscoveryNodes) HashSet(java.util.HashSet) OpenIndexRequest(org.elasticsearch.action.admin.indices.open.OpenIndexRequest) FailedShard(org.elasticsearch.cluster.routing.allocation.FailedShard) CloseIndexRequest(org.elasticsearch.action.admin.indices.close.CloseIndexRequest) CreateIndexRequest(org.elasticsearch.action.admin.indices.create.CreateIndexRequest) ShardRouting(org.elasticsearch.cluster.routing.ShardRouting)

Example 5 with DiscoveryNodes

use of org.elasticsearch.cluster.node.DiscoveryNodes in project elasticsearch by elastic.

the class ActionModule method initRestHandlers.

public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
    List<AbstractCatAction> catActions = new ArrayList<>();
    Consumer<RestHandler> registerHandler = a -> {
        if (a instanceof AbstractCatAction) {
            catActions.add((AbstractCatAction) a);
        }
    };
    registerHandler.accept(new RestMainAction(settings, restController));
    registerHandler.accept(new RestNodesInfoAction(settings, restController, settingsFilter));
    registerHandler.accept(new RestNodesStatsAction(settings, restController));
    registerHandler.accept(new RestNodesHotThreadsAction(settings, restController));
    registerHandler.accept(new RestClusterAllocationExplainAction(settings, restController));
    registerHandler.accept(new RestClusterStatsAction(settings, restController));
    registerHandler.accept(new RestClusterStateAction(settings, restController, settingsFilter));
    registerHandler.accept(new RestClusterHealthAction(settings, restController));
    registerHandler.accept(new RestClusterUpdateSettingsAction(settings, restController));
    registerHandler.accept(new RestClusterGetSettingsAction(settings, restController, clusterSettings, settingsFilter));
    registerHandler.accept(new RestClusterRerouteAction(settings, restController, settingsFilter));
    registerHandler.accept(new RestClusterSearchShardsAction(settings, restController));
    registerHandler.accept(new RestPendingClusterTasksAction(settings, restController));
    registerHandler.accept(new RestPutRepositoryAction(settings, restController));
    registerHandler.accept(new RestGetRepositoriesAction(settings, restController, settingsFilter));
    registerHandler.accept(new RestDeleteRepositoryAction(settings, restController));
    registerHandler.accept(new RestVerifyRepositoryAction(settings, restController));
    registerHandler.accept(new RestGetSnapshotsAction(settings, restController));
    registerHandler.accept(new RestCreateSnapshotAction(settings, restController));
    registerHandler.accept(new RestRestoreSnapshotAction(settings, restController));
    registerHandler.accept(new RestDeleteSnapshotAction(settings, restController));
    registerHandler.accept(new RestSnapshotsStatusAction(settings, restController));
    registerHandler.accept(new RestTypesExistsAction(settings, restController));
    registerHandler.accept(new RestGetIndicesAction(settings, restController, indexScopedSettings, settingsFilter));
    registerHandler.accept(new RestIndicesStatsAction(settings, restController));
    registerHandler.accept(new RestIndicesSegmentsAction(settings, restController));
    registerHandler.accept(new RestIndicesShardStoresAction(settings, restController));
    registerHandler.accept(new RestGetAliasesAction(settings, restController));
    registerHandler.accept(new RestIndexDeleteAliasesAction(settings, restController));
    registerHandler.accept(new RestIndexPutAliasAction(settings, restController));
    registerHandler.accept(new RestIndicesAliasesAction(settings, restController));
    registerHandler.accept(new RestCreateIndexAction(settings, restController));
    registerHandler.accept(new RestShrinkIndexAction(settings, restController));
    registerHandler.accept(new RestRolloverIndexAction(settings, restController));
    registerHandler.accept(new RestDeleteIndexAction(settings, restController));
    registerHandler.accept(new RestCloseIndexAction(settings, restController));
    registerHandler.accept(new RestOpenIndexAction(settings, restController));
    registerHandler.accept(new RestUpdateSettingsAction(settings, restController));
    registerHandler.accept(new RestGetSettingsAction(settings, restController, indexScopedSettings, settingsFilter));
    registerHandler.accept(new RestAnalyzeAction(settings, restController));
    registerHandler.accept(new RestGetIndexTemplateAction(settings, restController));
    registerHandler.accept(new RestPutIndexTemplateAction(settings, restController));
    registerHandler.accept(new RestDeleteIndexTemplateAction(settings, restController));
    registerHandler.accept(new RestPutMappingAction(settings, restController));
    registerHandler.accept(new RestGetMappingAction(settings, restController));
    registerHandler.accept(new RestGetFieldMappingAction(settings, restController));
    registerHandler.accept(new RestRefreshAction(settings, restController));
    registerHandler.accept(new RestFlushAction(settings, restController));
    registerHandler.accept(new RestSyncedFlushAction(settings, restController));
    registerHandler.accept(new RestForceMergeAction(settings, restController));
    registerHandler.accept(new RestUpgradeAction(settings, restController));
    registerHandler.accept(new RestClearIndicesCacheAction(settings, restController));
    registerHandler.accept(new RestIndexAction(settings, restController));
    registerHandler.accept(new RestGetAction(settings, restController));
    registerHandler.accept(new RestGetSourceAction(settings, restController));
    registerHandler.accept(new RestMultiGetAction(settings, restController));
    registerHandler.accept(new RestDeleteAction(settings, restController));
    registerHandler.accept(new org.elasticsearch.rest.action.document.RestCountAction(settings, restController));
    registerHandler.accept(new RestTermVectorsAction(settings, restController));
    registerHandler.accept(new RestMultiTermVectorsAction(settings, restController));
    registerHandler.accept(new RestBulkAction(settings, restController));
    registerHandler.accept(new RestUpdateAction(settings, restController));
    registerHandler.accept(new RestSearchAction(settings, restController));
    registerHandler.accept(new RestSearchScrollAction(settings, restController));
    registerHandler.accept(new RestClearScrollAction(settings, restController));
    registerHandler.accept(new RestMultiSearchAction(settings, restController));
    registerHandler.accept(new RestValidateQueryAction(settings, restController));
    registerHandler.accept(new RestExplainAction(settings, restController));
    registerHandler.accept(new RestRecoveryAction(settings, restController));
    // Scripts API
    registerHandler.accept(new RestGetStoredScriptAction(settings, restController));
    registerHandler.accept(new RestPutStoredScriptAction(settings, restController));
    registerHandler.accept(new RestDeleteStoredScriptAction(settings, restController));
    registerHandler.accept(new RestFieldStatsAction(settings, restController));
    // Tasks API
    registerHandler.accept(new RestListTasksAction(settings, restController, nodesInCluster));
    registerHandler.accept(new RestGetTaskAction(settings, restController));
    registerHandler.accept(new RestCancelTasksAction(settings, restController, nodesInCluster));
    // Ingest API
    registerHandler.accept(new RestPutPipelineAction(settings, restController));
    registerHandler.accept(new RestGetPipelineAction(settings, restController));
    registerHandler.accept(new RestDeletePipelineAction(settings, restController));
    registerHandler.accept(new RestSimulatePipelineAction(settings, restController));
    // CAT API
    registerHandler.accept(new RestAllocationAction(settings, restController));
    registerHandler.accept(new RestShardsAction(settings, restController));
    registerHandler.accept(new RestMasterAction(settings, restController));
    registerHandler.accept(new RestNodesAction(settings, restController));
    registerHandler.accept(new RestTasksAction(settings, restController, nodesInCluster));
    registerHandler.accept(new RestIndicesAction(settings, restController, indexNameExpressionResolver));
    registerHandler.accept(new RestSegmentsAction(settings, restController));
    // Fully qualified to prevent interference with rest.action.count.RestCountAction
    registerHandler.accept(new org.elasticsearch.rest.action.cat.RestCountAction(settings, restController));
    // Fully qualified to prevent interference with rest.action.indices.RestRecoveryAction
    registerHandler.accept(new org.elasticsearch.rest.action.cat.RestRecoveryAction(settings, restController));
    registerHandler.accept(new RestHealthAction(settings, restController));
    registerHandler.accept(new org.elasticsearch.rest.action.cat.RestPendingClusterTasksAction(settings, restController));
    registerHandler.accept(new RestAliasAction(settings, restController));
    registerHandler.accept(new RestThreadPoolAction(settings, restController));
    registerHandler.accept(new RestPluginsAction(settings, restController));
    registerHandler.accept(new RestFielddataAction(settings, restController));
    registerHandler.accept(new RestNodeAttrsAction(settings, restController));
    registerHandler.accept(new RestRepositoriesAction(settings, restController));
    registerHandler.accept(new RestSnapshotAction(settings, restController));
    registerHandler.accept(new RestTemplatesAction(settings, restController));
    for (ActionPlugin plugin : actionPlugins) {
        for (RestHandler handler : plugin.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster)) {
            registerHandler.accept(handler);
        }
    }
    registerHandler.accept(new RestCatAction(settings, restController, catActions));
}
Also used : RestClusterSearchShardsAction(org.elasticsearch.rest.action.admin.cluster.RestClusterSearchShardsAction) RestTasksAction(org.elasticsearch.rest.action.cat.RestTasksAction) Collections.unmodifiableList(java.util.Collections.unmodifiableList) CreateSnapshotAction(org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotAction) ListTasksAction(org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksAction) TransportTermVectorsAction(org.elasticsearch.action.termvectors.TransportTermVectorsAction) TransportSearchAction(org.elasticsearch.action.search.TransportSearchAction) TransportVerifyRepositoryAction(org.elasticsearch.action.admin.cluster.repositories.verify.TransportVerifyRepositoryAction) UpgradeAction(org.elasticsearch.action.admin.indices.upgrade.post.UpgradeAction) TransportCreateSnapshotAction(org.elasticsearch.action.admin.cluster.snapshots.create.TransportCreateSnapshotAction) TransportUpdateSettingsAction(org.elasticsearch.action.admin.indices.settings.put.TransportUpdateSettingsAction) RestPutPipelineAction(org.elasticsearch.rest.action.ingest.RestPutPipelineAction) DeletePipelineTransportAction(org.elasticsearch.action.ingest.DeletePipelineTransportAction) RestPluginsAction(org.elasticsearch.rest.action.cat.RestPluginsAction) TransportFieldStatsAction(org.elasticsearch.action.fieldstats.TransportFieldStatsAction) RestOpenIndexAction(org.elasticsearch.rest.action.admin.indices.RestOpenIndexAction) TransportGetTaskAction(org.elasticsearch.action.admin.cluster.node.tasks.get.TransportGetTaskAction) GetMappingsAction(org.elasticsearch.action.admin.indices.mapping.get.GetMappingsAction) Map(java.util.Map) PutStoredScriptAction(org.elasticsearch.action.admin.cluster.storedscripts.PutStoredScriptAction) MultiGetAction(org.elasticsearch.action.get.MultiGetAction) TransportClearIndicesCacheAction(org.elasticsearch.action.admin.indices.cache.clear.TransportClearIndicesCacheAction) TransportListTasksAction(org.elasticsearch.action.admin.cluster.node.tasks.list.TransportListTasksAction) NodesStatsAction(org.elasticsearch.action.admin.cluster.node.stats.NodesStatsAction) TransportAnalyzeAction(org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction) TransportNodesInfoAction(org.elasticsearch.action.admin.cluster.node.info.TransportNodesInfoAction) TransportUpgradeSettingsAction(org.elasticsearch.action.admin.indices.upgrade.post.TransportUpgradeSettingsAction) ActionFilters(org.elasticsearch.action.support.ActionFilters) GetStoredScriptAction(org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptAction) AbstractModule(org.elasticsearch.common.inject.AbstractModule) RestGetAliasesAction(org.elasticsearch.rest.action.admin.indices.RestGetAliasesAction) NamedRegistry(org.elasticsearch.common.NamedRegistry) Logger(org.apache.logging.log4j.Logger) RestBulkAction(org.elasticsearch.rest.action.document.RestBulkAction) RestDeleteAction(org.elasticsearch.rest.action.document.RestDeleteAction) TransportUpdateAction(org.elasticsearch.action.update.TransportUpdateAction) RestIndicesAction(org.elasticsearch.rest.action.cat.RestIndicesAction) TransportShrinkAction(org.elasticsearch.action.admin.indices.shrink.TransportShrinkAction) RestSimulatePipelineAction(org.elasticsearch.rest.action.ingest.RestSimulatePipelineAction) TransportMainAction(org.elasticsearch.action.main.TransportMainAction) TransportNodesStatsAction(org.elasticsearch.action.admin.cluster.node.stats.TransportNodesStatsAction) TransportGetRepositoriesAction(org.elasticsearch.action.admin.cluster.repositories.get.TransportGetRepositoriesAction) TransportUpgradeAction(org.elasticsearch.action.admin.indices.upgrade.post.TransportUpgradeAction) RestTypesExistsAction(org.elasticsearch.rest.action.admin.indices.RestTypesExistsAction) RestSearchAction(org.elasticsearch.rest.action.search.RestSearchAction) RestValidateQueryAction(org.elasticsearch.rest.action.admin.indices.RestValidateQueryAction) TransportShardBulkAction(org.elasticsearch.action.bulk.TransportShardBulkAction) MultiSearchAction(org.elasticsearch.action.search.MultiSearchAction) TransportShardMultiTermsVectorAction(org.elasticsearch.action.termvectors.TransportShardMultiTermsVectorAction) RestSyncedFlushAction(org.elasticsearch.rest.action.admin.indices.RestSyncedFlushAction) DeleteRepositoryAction(org.elasticsearch.action.admin.cluster.repositories.delete.DeleteRepositoryAction) Supplier(java.util.function.Supplier) GetTaskAction(org.elasticsearch.action.admin.cluster.node.tasks.get.GetTaskAction) TransportRolloverAction(org.elasticsearch.action.admin.indices.rollover.TransportRolloverAction) TransportGetIndexTemplatesAction(org.elasticsearch.action.admin.indices.template.get.TransportGetIndexTemplatesAction) RestClearScrollAction(org.elasticsearch.rest.action.search.RestClearScrollAction) RestDeletePipelineAction(org.elasticsearch.rest.action.ingest.RestDeletePipelineAction) TransportDeleteSnapshotAction(org.elasticsearch.action.admin.cluster.snapshots.delete.TransportDeleteSnapshotAction) RestClusterRerouteAction(org.elasticsearch.rest.action.admin.cluster.RestClusterRerouteAction) RestUpdateSettingsAction(org.elasticsearch.rest.action.admin.indices.RestUpdateSettingsAction) GetFieldMappingsAction(org.elasticsearch.action.admin.indices.mapping.get.GetFieldMappingsAction) RestGetMappingAction(org.elasticsearch.rest.action.admin.indices.RestGetMappingAction) IndicesStatsAction(org.elasticsearch.action.admin.indices.stats.IndicesStatsAction) RestSegmentsAction(org.elasticsearch.rest.action.cat.RestSegmentsAction) DiscoveryNodes(org.elasticsearch.cluster.node.DiscoveryNodes) RestRestoreSnapshotAction(org.elasticsearch.rest.action.admin.cluster.RestRestoreSnapshotAction) TransportGetStoredScriptAction(org.elasticsearch.action.admin.cluster.storedscripts.TransportGetStoredScriptAction) TransportPutStoredScriptAction(org.elasticsearch.action.admin.cluster.storedscripts.TransportPutStoredScriptAction) RestNodesInfoAction(org.elasticsearch.rest.action.admin.cluster.RestNodesInfoAction) ShrinkAction(org.elasticsearch.action.admin.indices.shrink.ShrinkAction) IndexAction(org.elasticsearch.action.index.IndexAction) MainAction(org.elasticsearch.action.main.MainAction) RestSnapshotAction(org.elasticsearch.rest.action.cat.RestSnapshotAction) ESLoggerFactory(org.elasticsearch.common.logging.ESLoggerFactory) PutPipelineAction(org.elasticsearch.action.ingest.PutPipelineAction) UpdateAction(org.elasticsearch.action.update.UpdateAction) RestNodesStatsAction(org.elasticsearch.rest.action.admin.cluster.RestNodesStatsAction) RestNodesAction(org.elasticsearch.rest.action.cat.RestNodesAction) ForceMergeAction(org.elasticsearch.action.admin.indices.forcemerge.ForceMergeAction) ExplainAction(org.elasticsearch.action.explain.ExplainAction) CloseIndexAction(org.elasticsearch.action.admin.indices.close.CloseIndexAction) RestGetSourceAction(org.elasticsearch.rest.action.document.RestGetSourceAction) AnalyzeAction(org.elasticsearch.action.admin.indices.analyze.AnalyzeAction) RestForceMergeAction(org.elasticsearch.rest.action.admin.indices.RestForceMergeAction) AbstractCatAction(org.elasticsearch.rest.action.cat.AbstractCatAction) TransportBulkAction(org.elasticsearch.action.bulk.TransportBulkAction) NodesInfoAction(org.elasticsearch.action.admin.cluster.node.info.NodesInfoAction) TransportGetFieldMappingsIndexAction(org.elasticsearch.action.admin.indices.mapping.get.TransportGetFieldMappingsIndexAction) TransportRefreshAction(org.elasticsearch.action.admin.indices.refresh.TransportRefreshAction) MultiTermVectorsAction(org.elasticsearch.action.termvectors.MultiTermVectorsAction) RestClusterHealthAction(org.elasticsearch.rest.action.admin.cluster.RestClusterHealthAction) AutoCreateIndex(org.elasticsearch.action.support.AutoCreateIndex) TransportUpgradeStatusAction(org.elasticsearch.action.admin.indices.upgrade.get.TransportUpgradeStatusAction) TransportMultiGetAction(org.elasticsearch.action.get.TransportMultiGetAction) Settings(org.elasticsearch.common.settings.Settings) ThreadPool(org.elasticsearch.threadpool.ThreadPool) PutMappingAction(org.elasticsearch.action.admin.indices.mapping.put.PutMappingAction) GetAction(org.elasticsearch.action.get.GetAction) TransportGetAliasesAction(org.elasticsearch.action.admin.indices.alias.get.TransportGetAliasesAction) TransportRecoveryAction(org.elasticsearch.action.admin.indices.recovery.TransportRecoveryAction) RestClusterStateAction(org.elasticsearch.rest.action.admin.cluster.RestClusterStateAction) TransportTypesExistsAction(org.elasticsearch.action.admin.indices.exists.types.TransportTypesExistsAction) ActionFilter(org.elasticsearch.action.support.ActionFilter) RestPutRepositoryAction(org.elasticsearch.rest.action.admin.cluster.RestPutRepositoryAction) ClusterRerouteAction(org.elasticsearch.action.admin.cluster.reroute.ClusterRerouteAction) TermVectorsAction(org.elasticsearch.action.termvectors.TermVectorsAction) Collectors(java.util.stream.Collectors) RestIndicesShardStoresAction(org.elasticsearch.rest.action.admin.indices.RestIndicesShardStoresAction) RestAliasAction(org.elasticsearch.rest.action.cat.RestAliasAction) RestAnalyzeAction(org.elasticsearch.rest.action.admin.indices.RestAnalyzeAction) TransportCreateIndexAction(org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction) TransportForceMergeAction(org.elasticsearch.action.admin.indices.forcemerge.TransportForceMergeAction) CreateIndexAction(org.elasticsearch.action.admin.indices.create.CreateIndexAction) ClearIndicesCacheAction(org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheAction) RolloverAction(org.elasticsearch.action.admin.indices.rollover.RolloverAction) RestGetFieldMappingAction(org.elasticsearch.rest.action.admin.indices.RestGetFieldMappingAction) GetSettingsAction(org.elasticsearch.action.admin.indices.settings.get.GetSettingsAction) RestIndexPutAliasAction(org.elasticsearch.rest.action.admin.indices.RestIndexPutAliasAction) RestTemplatesAction(org.elasticsearch.rest.action.cat.RestTemplatesAction) UpdateSettingsAction(org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsAction) TransportPutIndexTemplateAction(org.elasticsearch.action.admin.indices.template.put.TransportPutIndexTemplateAction) RestGetSettingsAction(org.elasticsearch.rest.action.admin.indices.RestGetSettingsAction) TransportIndicesShardStoresAction(org.elasticsearch.action.admin.indices.shards.TransportIndicesShardStoresAction) PutPipelineTransportAction(org.elasticsearch.action.ingest.PutPipelineTransportAction) RefreshAction(org.elasticsearch.action.admin.indices.refresh.RefreshAction) RestSearchScrollAction(org.elasticsearch.rest.action.search.RestSearchScrollAction) TransportRestoreSnapshotAction(org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction) RestRefreshAction(org.elasticsearch.rest.action.admin.indices.RestRefreshAction) NodeClient(org.elasticsearch.client.node.NodeClient) TransportIndicesSegmentsAction(org.elasticsearch.action.admin.indices.segments.TransportIndicesSegmentsAction) RestExplainAction(org.elasticsearch.rest.action.search.RestExplainAction) TransportFlushAction(org.elasticsearch.action.admin.indices.flush.TransportFlushAction) RestCatAction(org.elasticsearch.rest.action.cat.RestCatAction) RestIndicesSegmentsAction(org.elasticsearch.rest.action.admin.indices.RestIndicesSegmentsAction) DeleteSnapshotAction(org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotAction) RestMultiSearchAction(org.elasticsearch.rest.action.search.RestMultiSearchAction) TransportDeleteAction(org.elasticsearch.action.delete.TransportDeleteAction) RestGetSnapshotsAction(org.elasticsearch.rest.action.admin.cluster.RestGetSnapshotsAction) RestPutIndexTemplateAction(org.elasticsearch.rest.action.admin.indices.RestPutIndexTemplateAction) RestClearIndicesCacheAction(org.elasticsearch.rest.action.admin.indices.RestClearIndicesCacheAction) RestIndicesStatsAction(org.elasticsearch.rest.action.admin.indices.RestIndicesStatsAction) ClusterAllocationExplainAction(org.elasticsearch.action.admin.cluster.allocation.ClusterAllocationExplainAction) GetIndexTemplatesAction(org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesAction) IndexScopedSettings(org.elasticsearch.common.settings.IndexScopedSettings) Consumer(java.util.function.Consumer) RestHealthAction(org.elasticsearch.rest.action.cat.RestHealthAction) ClusterSettings(org.elasticsearch.common.settings.ClusterSettings) RestShardsAction(org.elasticsearch.rest.action.cat.RestShardsAction) RestGetIndexTemplateAction(org.elasticsearch.rest.action.admin.indices.RestGetIndexTemplateAction) RestAllocationAction(org.elasticsearch.rest.action.cat.RestAllocationAction) TransportCancelTasksAction(org.elasticsearch.action.admin.cluster.node.tasks.cancel.TransportCancelTasksAction) FlushAction(org.elasticsearch.action.admin.indices.flush.FlushAction) RestCancelTasksAction(org.elasticsearch.rest.action.admin.cluster.RestCancelTasksAction) IndexNameExpressionResolver(org.elasticsearch.cluster.metadata.IndexNameExpressionResolver) ClusterUpdateSettingsAction(org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsAction) IndicesExistsAction(org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsAction) TransportGetMappingsAction(org.elasticsearch.action.admin.indices.mapping.get.TransportGetMappingsAction) ValidateQueryAction(org.elasticsearch.action.admin.indices.validate.query.ValidateQueryAction) TransportExplainAction(org.elasticsearch.action.explain.TransportExplainAction) TransportGetAction(org.elasticsearch.action.get.TransportGetAction) UnaryOperator(java.util.function.UnaryOperator) DestructiveOperations(org.elasticsearch.action.support.DestructiveOperations) RestRepositoriesAction(org.elasticsearch.rest.action.cat.RestRepositoriesAction) UpgradeStatusAction(org.elasticsearch.action.admin.indices.upgrade.get.UpgradeStatusAction) TypesExistsAction(org.elasticsearch.action.admin.indices.exists.types.TypesExistsAction) RestClusterGetSettingsAction(org.elasticsearch.rest.action.admin.cluster.RestClusterGetSettingsAction) TransportAction(org.elasticsearch.action.support.TransportAction) DeleteIndexAction(org.elasticsearch.action.admin.indices.delete.DeleteIndexAction) BulkAction(org.elasticsearch.action.bulk.BulkAction) TransportPendingClusterTasksAction(org.elasticsearch.action.admin.cluster.tasks.TransportPendingClusterTasksAction) TransportIndicesAliasesAction(org.elasticsearch.action.admin.indices.alias.TransportIndicesAliasesAction) TransportIndexAction(org.elasticsearch.action.index.TransportIndexAction) RestRolloverIndexAction(org.elasticsearch.rest.action.admin.indices.RestRolloverIndexAction) TransportMultiSearchAction(org.elasticsearch.action.search.TransportMultiSearchAction) ClusterSearchShardsAction(org.elasticsearch.action.admin.cluster.shards.ClusterSearchShardsAction) RestDeleteIndexAction(org.elasticsearch.rest.action.admin.indices.RestDeleteIndexAction) RestPutStoredScriptAction(org.elasticsearch.rest.action.admin.cluster.RestPutStoredScriptAction) TransportCloseIndexAction(org.elasticsearch.action.admin.indices.close.TransportCloseIndexAction) TransportGetSettingsAction(org.elasticsearch.action.admin.indices.settings.get.TransportGetSettingsAction) TransportGetIndexAction(org.elasticsearch.action.admin.indices.get.TransportGetIndexAction) Set(java.util.Set) RestController(org.elasticsearch.rest.RestController) RestTermVectorsAction(org.elasticsearch.rest.action.document.RestTermVectorsAction) TransportIndicesStatsAction(org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction) RestGetStoredScriptAction(org.elasticsearch.rest.action.admin.cluster.RestGetStoredScriptAction) RestMultiTermVectorsAction(org.elasticsearch.rest.action.document.RestMultiTermVectorsAction) RestDeleteStoredScriptAction(org.elasticsearch.rest.action.admin.cluster.RestDeleteStoredScriptAction) RestVerifyRepositoryAction(org.elasticsearch.rest.action.admin.cluster.RestVerifyRepositoryAction) TransportSyncedFlushAction(org.elasticsearch.action.admin.indices.flush.TransportSyncedFlushAction) IndicesShardStoresAction(org.elasticsearch.action.admin.indices.shards.IndicesShardStoresAction) RestFielddataAction(org.elasticsearch.rest.action.cat.RestFielddataAction) PutIndexTemplateAction(org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateAction) RestGetTaskAction(org.elasticsearch.rest.action.admin.cluster.RestGetTaskAction) ClusterStatsAction(org.elasticsearch.action.admin.cluster.stats.ClusterStatsAction) TransportOpenIndexAction(org.elasticsearch.action.admin.indices.open.TransportOpenIndexAction) CircuitBreakerService(org.elasticsearch.indices.breaker.CircuitBreakerService) ArrayList(java.util.ArrayList) RestMultiGetAction(org.elasticsearch.rest.action.document.RestMultiGetAction) TransportClusterSearchShardsAction(org.elasticsearch.action.admin.cluster.shards.TransportClusterSearchShardsAction) RestClusterStatsAction(org.elasticsearch.rest.action.admin.cluster.RestClusterStatsAction) RestPutMappingAction(org.elasticsearch.rest.action.admin.indices.RestPutMappingAction) GetPipelineTransportAction(org.elasticsearch.action.ingest.GetPipelineTransportAction) RestRecoveryAction(org.elasticsearch.rest.action.admin.indices.RestRecoveryAction) RestPendingClusterTasksAction(org.elasticsearch.rest.action.admin.cluster.RestPendingClusterTasksAction) UpgradeSettingsAction(org.elasticsearch.action.admin.indices.upgrade.post.UpgradeSettingsAction) CancelTasksAction(org.elasticsearch.action.admin.cluster.node.tasks.cancel.CancelTasksAction) RestDeleteIndexTemplateAction(org.elasticsearch.rest.action.admin.indices.RestDeleteIndexTemplateAction) GetAliasesAction(org.elasticsearch.action.admin.indices.alias.get.GetAliasesAction) TransportClearScrollAction(org.elasticsearch.action.search.TransportClearScrollAction) IndicesAliasesAction(org.elasticsearch.action.admin.indices.alias.IndicesAliasesAction) GetRepositoriesAction(org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesAction) TransportClusterAllocationExplainAction(org.elasticsearch.action.admin.cluster.allocation.TransportClusterAllocationExplainAction) RestGetPipelineAction(org.elasticsearch.rest.action.ingest.RestGetPipelineAction) NodesHotThreadsAction(org.elasticsearch.action.admin.cluster.node.hotthreads.NodesHotThreadsAction) RestCloseIndexAction(org.elasticsearch.rest.action.admin.indices.RestCloseIndexAction) RestClusterAllocationExplainAction(org.elasticsearch.rest.action.admin.cluster.RestClusterAllocationExplainAction) GetPipelineAction(org.elasticsearch.action.ingest.GetPipelineAction) RestCreateSnapshotAction(org.elasticsearch.rest.action.admin.cluster.RestCreateSnapshotAction) RestUpgradeAction(org.elasticsearch.rest.action.admin.indices.RestUpgradeAction) TransportNodesHotThreadsAction(org.elasticsearch.action.admin.cluster.node.hotthreads.TransportNodesHotThreadsAction) RestFieldStatsAction(org.elasticsearch.rest.action.RestFieldStatsAction) RestMasterAction(org.elasticsearch.rest.action.cat.RestMasterAction) TransportLivenessAction(org.elasticsearch.action.admin.cluster.node.liveness.TransportLivenessAction) RestDeleteSnapshotAction(org.elasticsearch.rest.action.admin.cluster.RestDeleteSnapshotAction) TransportDeleteRepositoryAction(org.elasticsearch.action.admin.cluster.repositories.delete.TransportDeleteRepositoryAction) RestIndexDeleteAliasesAction(org.elasticsearch.rest.action.admin.indices.RestIndexDeleteAliasesAction) TransportMultiTermVectorsAction(org.elasticsearch.action.termvectors.TransportMultiTermVectorsAction) TransportSnapshotsStatusAction(org.elasticsearch.action.admin.cluster.snapshots.status.TransportSnapshotsStatusAction) TransportDeleteStoredScriptAction(org.elasticsearch.action.admin.cluster.storedscripts.TransportDeleteStoredScriptAction) RestClusterUpdateSettingsAction(org.elasticsearch.rest.action.admin.cluster.RestClusterUpdateSettingsAction) DeleteStoredScriptAction(org.elasticsearch.action.admin.cluster.storedscripts.DeleteStoredScriptAction) RestGetAction(org.elasticsearch.rest.action.document.RestGetAction) Multibinder(org.elasticsearch.common.inject.multibindings.Multibinder) SimulatePipelineTransportAction(org.elasticsearch.action.ingest.SimulatePipelineTransportAction) RestIndicesAliasesAction(org.elasticsearch.rest.action.admin.indices.RestIndicesAliasesAction) TransportSearchScrollAction(org.elasticsearch.action.search.TransportSearchScrollAction) TransportValidateQueryAction(org.elasticsearch.action.admin.indices.validate.query.TransportValidateQueryAction) RestNodesHotThreadsAction(org.elasticsearch.rest.action.admin.cluster.RestNodesHotThreadsAction) IndicesSegmentsAction(org.elasticsearch.action.admin.indices.segments.IndicesSegmentsAction) DeleteIndexTemplateAction(org.elasticsearch.action.admin.indices.template.delete.DeleteIndexTemplateAction) SimulatePipelineAction(org.elasticsearch.action.ingest.SimulatePipelineAction) SyncedFlushAction(org.elasticsearch.action.admin.indices.flush.SyncedFlushAction) GetSnapshotsAction(org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsAction) RestUpdateAction(org.elasticsearch.rest.action.document.RestUpdateAction) PutRepositoryAction(org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryAction) RestShrinkIndexAction(org.elasticsearch.rest.action.admin.indices.RestShrinkIndexAction) RecoveryAction(org.elasticsearch.action.admin.indices.recovery.RecoveryAction) RestMainAction(org.elasticsearch.rest.action.RestMainAction) FieldStatsAction(org.elasticsearch.action.fieldstats.FieldStatsAction) GetIndexAction(org.elasticsearch.action.admin.indices.get.GetIndexAction) TransportDeleteIndexAction(org.elasticsearch.action.admin.indices.delete.TransportDeleteIndexAction) RestThreadPoolAction(org.elasticsearch.rest.action.cat.RestThreadPoolAction) OpenIndexAction(org.elasticsearch.action.admin.indices.open.OpenIndexAction) RestSnapshotsStatusAction(org.elasticsearch.rest.action.admin.cluster.RestSnapshotsStatusAction) RestDeleteRepositoryAction(org.elasticsearch.rest.action.admin.cluster.RestDeleteRepositoryAction) List(java.util.List) TransportShardMultiGetAction(org.elasticsearch.action.get.TransportShardMultiGetAction) ClearScrollAction(org.elasticsearch.action.search.ClearScrollAction) TransportClusterStatsAction(org.elasticsearch.action.admin.cluster.stats.TransportClusterStatsAction) VerifyRepositoryAction(org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryAction) RestGetIndicesAction(org.elasticsearch.rest.action.admin.indices.RestGetIndicesAction) ClusterStateAction(org.elasticsearch.action.admin.cluster.state.ClusterStateAction) RestIndexAction(org.elasticsearch.rest.action.document.RestIndexAction) TransportClusterHealthAction(org.elasticsearch.action.admin.cluster.health.TransportClusterHealthAction) RestoreSnapshotAction(org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotAction) PendingClusterTasksAction(org.elasticsearch.action.admin.cluster.tasks.PendingClusterTasksAction) TransportIndicesExistsAction(org.elasticsearch.action.admin.indices.exists.indices.TransportIndicesExistsAction) SnapshotsStatusAction(org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusAction) RestFlushAction(org.elasticsearch.rest.action.admin.indices.RestFlushAction) RestCreateIndexAction(org.elasticsearch.rest.action.admin.indices.RestCreateIndexAction) TransportClusterRerouteAction(org.elasticsearch.action.admin.cluster.reroute.TransportClusterRerouteAction) TransportClusterStateAction(org.elasticsearch.action.admin.cluster.state.TransportClusterStateAction) TransportDeleteIndexTemplateAction(org.elasticsearch.action.admin.indices.template.delete.TransportDeleteIndexTemplateAction) RestListTasksAction(org.elasticsearch.rest.action.admin.cluster.RestListTasksAction) RestHandler(org.elasticsearch.rest.RestHandler) MapBinder(org.elasticsearch.common.inject.multibindings.MapBinder) RestNodeAttrsAction(org.elasticsearch.rest.action.cat.RestNodeAttrsAction) RestGetRepositoriesAction(org.elasticsearch.rest.action.admin.cluster.RestGetRepositoriesAction) SearchAction(org.elasticsearch.action.search.SearchAction) ClusterHealthAction(org.elasticsearch.action.admin.cluster.health.ClusterHealthAction) TransportPutMappingAction(org.elasticsearch.action.admin.indices.mapping.put.TransportPutMappingAction) SettingsFilter(org.elasticsearch.common.settings.SettingsFilter) ActionPlugin(org.elasticsearch.plugins.ActionPlugin) TransportPutRepositoryAction(org.elasticsearch.action.admin.cluster.repositories.put.TransportPutRepositoryAction) SearchScrollAction(org.elasticsearch.action.search.SearchScrollAction) TransportClusterUpdateSettingsAction(org.elasticsearch.action.admin.cluster.settings.TransportClusterUpdateSettingsAction) DeleteAction(org.elasticsearch.action.delete.DeleteAction) TransportGetFieldMappingsAction(org.elasticsearch.action.admin.indices.mapping.get.TransportGetFieldMappingsAction) AliasesExistAction(org.elasticsearch.action.admin.indices.alias.exists.AliasesExistAction) ActionHandler(org.elasticsearch.plugins.ActionPlugin.ActionHandler) DeletePipelineAction(org.elasticsearch.action.ingest.DeletePipelineAction) TransportAliasesExistAction(org.elasticsearch.action.admin.indices.alias.exists.TransportAliasesExistAction) Collections.unmodifiableMap(java.util.Collections.unmodifiableMap) TransportGetSnapshotsAction(org.elasticsearch.action.admin.cluster.snapshots.get.TransportGetSnapshotsAction) AbstractCatAction(org.elasticsearch.rest.action.cat.AbstractCatAction) RestIndicesAliasesAction(org.elasticsearch.rest.action.admin.indices.RestIndicesAliasesAction) RestGetMappingAction(org.elasticsearch.rest.action.admin.indices.RestGetMappingAction) ArrayList(java.util.ArrayList) RestExplainAction(org.elasticsearch.rest.action.search.RestExplainAction) ActionPlugin(org.elasticsearch.plugins.ActionPlugin) RestDeletePipelineAction(org.elasticsearch.rest.action.ingest.RestDeletePipelineAction) RestTasksAction(org.elasticsearch.rest.action.cat.RestTasksAction) RestGetPipelineAction(org.elasticsearch.rest.action.ingest.RestGetPipelineAction) RestGetStoredScriptAction(org.elasticsearch.rest.action.admin.cluster.RestGetStoredScriptAction) RestUpdateAction(org.elasticsearch.rest.action.document.RestUpdateAction) RestVerifyRepositoryAction(org.elasticsearch.rest.action.admin.cluster.RestVerifyRepositoryAction) RestMultiSearchAction(org.elasticsearch.rest.action.search.RestMultiSearchAction) RestMasterAction(org.elasticsearch.rest.action.cat.RestMasterAction) RestClearIndicesCacheAction(org.elasticsearch.rest.action.admin.indices.RestClearIndicesCacheAction) RestAllocationAction(org.elasticsearch.rest.action.cat.RestAllocationAction) RestCatAction(org.elasticsearch.rest.action.cat.RestCatAction) RestIndexPutAliasAction(org.elasticsearch.rest.action.admin.indices.RestIndexPutAliasAction) RestPutIndexTemplateAction(org.elasticsearch.rest.action.admin.indices.RestPutIndexTemplateAction) RestClearScrollAction(org.elasticsearch.rest.action.search.RestClearScrollAction) RestHandler(org.elasticsearch.rest.RestHandler) RestRestoreSnapshotAction(org.elasticsearch.rest.action.admin.cluster.RestRestoreSnapshotAction) RestPutPipelineAction(org.elasticsearch.rest.action.ingest.RestPutPipelineAction) RestPutMappingAction(org.elasticsearch.rest.action.admin.indices.RestPutMappingAction) RestRolloverIndexAction(org.elasticsearch.rest.action.admin.indices.RestRolloverIndexAction) RestSearchScrollAction(org.elasticsearch.rest.action.search.RestSearchScrollAction) RestPendingClusterTasksAction(org.elasticsearch.rest.action.admin.cluster.RestPendingClusterTasksAction) RestPutRepositoryAction(org.elasticsearch.rest.action.admin.cluster.RestPutRepositoryAction) RestDeleteIndexTemplateAction(org.elasticsearch.rest.action.admin.indices.RestDeleteIndexTemplateAction) RestDeleteRepositoryAction(org.elasticsearch.rest.action.admin.cluster.RestDeleteRepositoryAction) RestOpenIndexAction(org.elasticsearch.rest.action.admin.indices.RestOpenIndexAction) RestSimulatePipelineAction(org.elasticsearch.rest.action.ingest.RestSimulatePipelineAction) RestGetAction(org.elasticsearch.rest.action.document.RestGetAction) RestIndicesAction(org.elasticsearch.rest.action.cat.RestIndicesAction) RestCancelTasksAction(org.elasticsearch.rest.action.admin.cluster.RestCancelTasksAction) RestAnalyzeAction(org.elasticsearch.rest.action.admin.indices.RestAnalyzeAction) RestSyncedFlushAction(org.elasticsearch.rest.action.admin.indices.RestSyncedFlushAction) RestCreateSnapshotAction(org.elasticsearch.rest.action.admin.cluster.RestCreateSnapshotAction) RestGetTaskAction(org.elasticsearch.rest.action.admin.cluster.RestGetTaskAction) RestFieldStatsAction(org.elasticsearch.rest.action.RestFieldStatsAction) RestMainAction(org.elasticsearch.rest.action.RestMainAction) RestDeleteSnapshotAction(org.elasticsearch.rest.action.admin.cluster.RestDeleteSnapshotAction) RestClusterHealthAction(org.elasticsearch.rest.action.admin.cluster.RestClusterHealthAction) RestRefreshAction(org.elasticsearch.rest.action.admin.indices.RestRefreshAction) RestClusterGetSettingsAction(org.elasticsearch.rest.action.admin.cluster.RestClusterGetSettingsAction) RestSnapshotsStatusAction(org.elasticsearch.rest.action.admin.cluster.RestSnapshotsStatusAction) RestNodesInfoAction(org.elasticsearch.rest.action.admin.cluster.RestNodesInfoAction) RestGetIndexTemplateAction(org.elasticsearch.rest.action.admin.indices.RestGetIndexTemplateAction) RestAliasAction(org.elasticsearch.rest.action.cat.RestAliasAction) RestClusterRerouteAction(org.elasticsearch.rest.action.admin.cluster.RestClusterRerouteAction) RestTemplatesAction(org.elasticsearch.rest.action.cat.RestTemplatesAction) RestSearchAction(org.elasticsearch.rest.action.search.RestSearchAction) RestNodesAction(org.elasticsearch.rest.action.cat.RestNodesAction) RestGetIndicesAction(org.elasticsearch.rest.action.admin.indices.RestGetIndicesAction) RestThreadPoolAction(org.elasticsearch.rest.action.cat.RestThreadPoolAction) RestHealthAction(org.elasticsearch.rest.action.cat.RestHealthAction) RestFielddataAction(org.elasticsearch.rest.action.cat.RestFielddataAction) RestUpgradeAction(org.elasticsearch.rest.action.admin.indices.RestUpgradeAction) RestSegmentsAction(org.elasticsearch.rest.action.cat.RestSegmentsAction) RestClusterUpdateSettingsAction(org.elasticsearch.rest.action.admin.cluster.RestClusterUpdateSettingsAction) RestGetSnapshotsAction(org.elasticsearch.rest.action.admin.cluster.RestGetSnapshotsAction) RestGetFieldMappingAction(org.elasticsearch.rest.action.admin.indices.RestGetFieldMappingAction) RestGetSourceAction(org.elasticsearch.rest.action.document.RestGetSourceAction) RestNodesHotThreadsAction(org.elasticsearch.rest.action.admin.cluster.RestNodesHotThreadsAction) RestDeleteStoredScriptAction(org.elasticsearch.rest.action.admin.cluster.RestDeleteStoredScriptAction) RestClusterStateAction(org.elasticsearch.rest.action.admin.cluster.RestClusterStateAction) RestShrinkIndexAction(org.elasticsearch.rest.action.admin.indices.RestShrinkIndexAction) RestClusterSearchShardsAction(org.elasticsearch.rest.action.admin.cluster.RestClusterSearchShardsAction) RestPluginsAction(org.elasticsearch.rest.action.cat.RestPluginsAction) RestGetAliasesAction(org.elasticsearch.rest.action.admin.indices.RestGetAliasesAction) RestMultiGetAction(org.elasticsearch.rest.action.document.RestMultiGetAction) RestClusterStatsAction(org.elasticsearch.rest.action.admin.cluster.RestClusterStatsAction) RestTypesExistsAction(org.elasticsearch.rest.action.admin.indices.RestTypesExistsAction) RestCreateIndexAction(org.elasticsearch.rest.action.admin.indices.RestCreateIndexAction) RestSnapshotAction(org.elasticsearch.rest.action.cat.RestSnapshotAction) RestRepositoriesAction(org.elasticsearch.rest.action.cat.RestRepositoriesAction) RestIndicesSegmentsAction(org.elasticsearch.rest.action.admin.indices.RestIndicesSegmentsAction) RestMultiTermVectorsAction(org.elasticsearch.rest.action.document.RestMultiTermVectorsAction) RestClusterAllocationExplainAction(org.elasticsearch.rest.action.admin.cluster.RestClusterAllocationExplainAction) RestIndexDeleteAliasesAction(org.elasticsearch.rest.action.admin.indices.RestIndexDeleteAliasesAction) RestBulkAction(org.elasticsearch.rest.action.document.RestBulkAction) RestIndicesShardStoresAction(org.elasticsearch.rest.action.admin.indices.RestIndicesShardStoresAction) RestCloseIndexAction(org.elasticsearch.rest.action.admin.indices.RestCloseIndexAction) RestGetRepositoriesAction(org.elasticsearch.rest.action.admin.cluster.RestGetRepositoriesAction) RestListTasksAction(org.elasticsearch.rest.action.admin.cluster.RestListTasksAction) RestValidateQueryAction(org.elasticsearch.rest.action.admin.indices.RestValidateQueryAction) RestIndicesStatsAction(org.elasticsearch.rest.action.admin.indices.RestIndicesStatsAction) RestForceMergeAction(org.elasticsearch.rest.action.admin.indices.RestForceMergeAction) RestUpdateSettingsAction(org.elasticsearch.rest.action.admin.indices.RestUpdateSettingsAction) RestPutStoredScriptAction(org.elasticsearch.rest.action.admin.cluster.RestPutStoredScriptAction) RestDeleteIndexAction(org.elasticsearch.rest.action.admin.indices.RestDeleteIndexAction) RestIndexAction(org.elasticsearch.rest.action.document.RestIndexAction) RestRecoveryAction(org.elasticsearch.rest.action.admin.indices.RestRecoveryAction) RestShardsAction(org.elasticsearch.rest.action.cat.RestShardsAction) RestNodesStatsAction(org.elasticsearch.rest.action.admin.cluster.RestNodesStatsAction) RestFlushAction(org.elasticsearch.rest.action.admin.indices.RestFlushAction) RestTermVectorsAction(org.elasticsearch.rest.action.document.RestTermVectorsAction) RestNodeAttrsAction(org.elasticsearch.rest.action.cat.RestNodeAttrsAction) RestGetSettingsAction(org.elasticsearch.rest.action.admin.indices.RestGetSettingsAction) RestDeleteAction(org.elasticsearch.rest.action.document.RestDeleteAction)

Aggregations

DiscoveryNodes (org.elasticsearch.cluster.node.DiscoveryNodes)129 DiscoveryNode (org.elasticsearch.cluster.node.DiscoveryNode)74 ClusterState (org.elasticsearch.cluster.ClusterState)45 Settings (org.elasticsearch.common.settings.Settings)37 ArrayList (java.util.ArrayList)32 IOException (java.io.IOException)27 HashSet (java.util.HashSet)25 List (java.util.List)24 Map (java.util.Map)23 TransportService (org.elasticsearch.transport.TransportService)23 Version (org.elasticsearch.Version)22 HashMap (java.util.HashMap)20 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)20 ShardRouting (org.elasticsearch.cluster.routing.ShardRouting)20 Set (java.util.Set)19 TransportException (org.elasticsearch.transport.TransportException)19 Collections (java.util.Collections)18 ThreadPool (org.elasticsearch.threadpool.ThreadPool)18 CountDownLatch (java.util.concurrent.CountDownLatch)16 Collectors (java.util.stream.Collectors)16