Package org.elasticsearch.action.admin.cluster.node.hotthreads

Examples of org.elasticsearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRequest


public class NodesHotThreadsRequestBuilder<JsonInput> extends AbstractRequestBuilder<NodesHotThreadsRequest, NodesHotThreadsResponse, JsonInput, String> {

    private static final Logger logger = LoggerFactory.getLogger(NodesHotThreadsRequestBuilder.class);

    public NodesHotThreadsRequestBuilder(Client client, JsonToString<JsonInput> jsonToString) {
        super(client, new NodesHotThreadsRequest(), jsonToString);
    }
View Full Code Here


    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        String[] nodesIds = Strings.splitStringByCommaToArray(request.param("nodeId"));
        NodesHotThreadsRequest nodesHotThreadsRequest = new NodesHotThreadsRequest(nodesIds);
        nodesHotThreadsRequest.threads(request.paramAsInt("threads", nodesHotThreadsRequest.threads()));
        nodesHotThreadsRequest.type(request.param("type", nodesHotThreadsRequest.type()));
        nodesHotThreadsRequest.interval(TimeValue.parseTimeValue(request.param("interval"), nodesHotThreadsRequest.interval()));
        nodesHotThreadsRequest.snapshots(request.paramAsInt("snapshots", nodesHotThreadsRequest.snapshots()));
        client.admin().cluster().nodesHotThreads(nodesHotThreadsRequest, new RestResponseListener<NodesHotThreadsResponse>(channel) {
            @Override
            public RestResponse buildResponse(NodesHotThreadsResponse response) throws Exception {
                StringBuilder sb = new StringBuilder();
                for (NodeHotThreads node : response) {
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRequest

Copyright © 2018 www.massapicom. 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.