Package org.apache.zookeeper
Class ZooKeeperMain
java.lang.Object
org.apache.zookeeper.ZooKeeperMain
The command line client to ZooKeeper.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addToHistory
(int i, String cmd) Makes a list of possible completions, either for commands or for zk nodes if the token to complete begins with /protected void
connectToZK
(String newHost) void
executeLine
(String line) boolean
protected String
static void
static void
printMessage
(String msg) protected boolean
processCmd
(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co) protected boolean
processZKCmd
(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co)
-
Field Details
-
cl
protected org.apache.zookeeper.ZooKeeperMain.MyCommandOptions cl -
history
-
commandCount
protected int commandCount -
printWatches
protected boolean printWatches -
exitCode
protected int exitCode -
zk
-
host
-
-
Constructor Details
-
ZooKeeperMain
- Throws:
IOException
InterruptedException
-
ZooKeeperMain
-
-
Method Details
-
getPrintWatches
public boolean getPrintWatches() -
addToHistory
Makes a list of possible completions, either for commands or for zk nodes if the token to complete begins with / -
getCommands
-
getPrompt
-
printMessage
-
connectToZK
- Throws:
InterruptedException
IOException
-
main
- Throws:
IOException
InterruptedException
-
executeLine
- Throws:
InterruptedException
IOException
-
processCmd
protected boolean processCmd(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
processZKCmd
protected boolean processZKCmd(org.apache.zookeeper.ZooKeeperMain.MyCommandOptions co) throws CliException, IOException, InterruptedException
-