org.apache.solr.cloud
Class ZkTestServer
java.lang.Object
org.apache.solr.cloud.ZkTestServer
public class ZkTestServer
- extends Object
Field Summary |
static int |
TICK_TIME
|
protected org.apache.solr.cloud.ZkTestServer.ZKServerMain |
zkServer
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TICK_TIME
public static final int TICK_TIME
- See Also:
- Constant Field Values
zkServer
protected final org.apache.solr.cloud.ZkTestServer.ZKServerMain zkServer
ZkTestServer
public ZkTestServer(String zkDir)
ZkTestServer
public ZkTestServer(String zkDir,
int port)
getZkHost
public String getZkHost()
getZkAddress
public String getZkAddress()
getPort
public int getPort()
expire
public void expire(long sessionId)
run
public void run()
throws InterruptedException
- Throws:
InterruptedException
shutdown
public void shutdown()
throws IOException
- Throws:
IOException
waitForServerDown
public static boolean waitForServerDown(String hp,
long timeout)
send4LetterWord
public static String send4LetterWord(String host,
int port,
String cmd)
throws IOException
- Send the 4letterword
- Parameters:
host
- the destination hostport
- the destination portcmd
- the 4letterword
- Returns:
- server response
- Throws:
IOException
parseHostPortList
public static List<ZkTestServer.HostPort> parseHostPortList(String hplist)
getTheTickTime
public int getTheTickTime()
setTheTickTime
public void setTheTickTime(int theTickTime)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.