Skip to content

Instantly share code, notes, and snippets.

@kimchy
Created March 17, 2012 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimchy/2057402 to your computer and use it in GitHub Desktop.
Save kimchy/2057402 to your computer and use it in GitHub Desktop.
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
public class Test {
public static void main(String[] args) {
TransportClient client = new TransportClient();
System.out.println(System.currentTimeMillis() + " BEFORE ");
client.addTransportAddress(new InetSocketTransportAddress("localhost", 9300));
System.out.println(System.currentTimeMillis() + " AFTER: " + client.connectedNodes().size());
}
}
@liujl
Copy link

liujl commented Jul 26, 2013

greate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment