Examples of connectedNodes()


Examples of org.elasticsearch.client.transport.TransportClient.connectedNodes()

    TransportClient tClient = (TransportClient) client;
    ImmutableList<TransportAddress> adresses = tClient.transportAddresses();
        assertThat("Nodes urls must not be empty...", adresses, not(emptyCollectionOf(TransportAddress.class)));

    // Testing if we are really connected to a cluster node
        assertThat("We should be connected at least to one node.", tClient.connectedNodes(), not(emptyCollectionOf(DiscoveryNode.class)));

    DiscoveryNode node = tClient.connectedNodes().get(0);
        assertThat(node.getName(), is("junit.node.transport"));
        assertThat("We should be connected to the master node.", node.isMasterNode(), is(true));
  }
View Full Code Here

Examples of org.elasticsearch.client.transport.TransportClient.connectedNodes()

        assertThat("Nodes urls must not be empty...", adresses, not(emptyCollectionOf(TransportAddress.class)));

    // Testing if we are really connected to a cluster node
        assertThat("We should be connected at least to one node.", tClient.connectedNodes(), not(emptyCollectionOf(DiscoveryNode.class)));

    DiscoveryNode node = tClient.connectedNodes().get(0);
        assertThat(node.getName(), is("junit.node.transport"));
        assertThat("We should be connected to the master node.", node.isMasterNode(), is(true));
  }
}
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.