Created
March 17, 2012 10:31
-
-
Save kimchy/2057402 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
greate