public abstract class ZkScript extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ZkScript(ZkQuickConnectionManager zkQuickConnectionManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
connect(String server,
int timeout) |
protected abstract String |
getName() |
protected abstract org.apache.commons.cli.Options |
getSpecificOptions() |
protected ZooKeeperIface |
getZk() |
void |
runMain(String[] args)
Main method to launch any script that derives from this abstract class
|
protected abstract void |
runScript(org.apache.commons.cli.CommandLine cmd)
Executes the script (assuming already connected to ZooKeeper)
|
protected abstract boolean |
verifySpecificOptions(org.apache.commons.cli.CommandLine cmd)
Verifies the integrity of the script specific command line parameters
|
protected ZkScript(ZkQuickConnectionManager zkQuickConnectionManager)
public void connect(String server, int timeout) throws IOException, InterruptedException, TimeoutException
public void close()
throws InterruptedException
InterruptedExceptionprotected ZooKeeperIface getZk()
protected abstract String getName()
protected abstract org.apache.commons.cli.Options getSpecificOptions()
protected abstract boolean verifySpecificOptions(org.apache.commons.cli.CommandLine cmd)
cmd - protected abstract void runScript(org.apache.commons.cli.CommandLine cmd)
throws Exception
cmd - ExceptionCopyright © 2012–2015 Facebook, Inc.. All rights reserved.