Examples of ClusterState


Examples of org.elasticsearch.cluster.ClusterState

                    }
                    if (request.state == State.CLOSE) {
                        blocks.addIndexBlock(request.index, MetaDataStateIndexService.INDEX_CLOSED_BLOCK);
                    }

                    ClusterState updatedState = newClusterStateBuilder().state(currentState).blocks(blocks).metaData(newMetaData).build();

                    if (request.state == State.OPEN) {
                        RoutingTable.Builder routingTableBuilder = RoutingTable.builder().routingTable(updatedState.routingTable());
                        IndexRoutingTable.Builder indexRoutingBuilder = new IndexRoutingTable.Builder(request.index)
                                .initializeEmpty(updatedState.metaData().index(request.index), true);
                        routingTableBuilder.add(indexRoutingBuilder);
                        RoutingAllocation.Result routingResult = shardsAllocation.reroute(newClusterStateBuilder().state(updatedState).routingTable(routingTableBuilder).build());
                        updatedState = newClusterStateBuilder().state(updatedState).routingResult(routingResult).build();
                    }
View Full Code Here

Examples of org.elasticsearch.cluster.ClusterState

        private AsyncSingleAction(Request request, ActionListener<Response> listener) {
            this.request = request;
            this.listener = listener;

            ClusterState clusterState = clusterService.state();
            nodes = clusterState.nodes();

            checkBlock(request, clusterState);
            this.shardsIt = shards(clusterState, request);
        }
View Full Code Here

Examples of org.elasticsearch.cluster.ClusterState

        transportService.registerHandler(transportAction(), new TransportHandler());
    }

    @Override protected void doExecute(final Request request, final ActionListener<Response> listener) {

        ClusterState clusterState = clusterService.state();
        // update to concrete index
        request.index(clusterState.metaData().concreteIndex(request.index()));

        checkBlock(request, clusterState);

        GroupShardsIterator groups;
        try {
View Full Code Here

Examples of org.springframework.yarn.am.cluster.ClusterState

  }

  public ContainerClusterResource(ContainerCluster cluster) {
    this.id = cluster.getId();
    this.gridProjection = new GridProjectionResource(cluster.getGridProjection());
    ClusterState clusterState = cluster.getStateMachine().getState().getId();
    containerClusterState = new ContainerClusterStateResource(clusterState);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.