Examples of prepareClusterStats()


Examples of org.elasticsearch.client.ClusterAdminClient.prepareClusterStats()

        return null;
    }

    public void bindNode(Node node) {
        ClusterAdminClient client = node.client().admin().cluster();
        ClusterStatsResponse response = client.prepareClusterStats().execute().actionGet();
        String clusterName = response.getClusterNameAsString();
        Set<Node> nodeSet = nodesClusterMap.get(clusterName);
        if (nodeSet == null) {
            nodeSet = new HashSet<Node>();
            nodesClusterMap.put(clusterName, nodeSet);
View Full Code Here

Examples of org.elasticsearch.client.ClusterAdminClient.prepareClusterStats()

        nodeSet.add(node);
    }

    public void unbindNode(Node node) {
        ClusterAdminClient client = node.client().admin().cluster();
        ClusterStatsResponse response = client.prepareClusterStats().execute().actionGet();
        String clusterName = response.getClusterNameAsString();
        Set<Node> nodeSet = nodesClusterMap.get(clusterName);
        if (nodeSet != null) {
            nodeSet.remove(node);
            if (nodeSet.isEmpty()) {
View Full Code Here

Examples of org.sonar.server.search.SearchClient.prepareClusterStats()

  public void with_profiling_basic() {
    Profiling profiling = new Profiling(new Settings().setProperty(Profiling.CONFIG_PROFILING_LEVEL, Profiling.Level.BASIC.name()));
    SearchClient searchClient = new SearchClient(new Settings(), profiling);

    try {
      ClusterStatsRequestBuilder requestBuilder = searchClient.prepareClusterStats();
      requestBuilder.get();

      // expected to fail because elasticsearch is not correctly configured, but that does not matter
      fail();
    } catch (IllegalStateException e) {
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.