|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.jini.start.config.ServiceConfiguration.AbstractServiceStarter<V>
com.bigdata.jini.start.config.JavaServiceConfiguration.JavaServiceStarter<V>
com.bigdata.jini.start.config.ZookeeperServerConfiguration.ZookeeperServiceStarter<V>
public class ZookeeperServerConfiguration.ZookeeperServiceStarter<V extends ZookeeperProcessHelper>
| Field Summary | |
|---|---|
protected ZookeeperServerEntry |
entry
Identifies the specific server instance to start. |
| Fields inherited from class com.bigdata.jini.start.config.JavaServiceConfiguration.JavaServiceStarter |
|---|
cls |
| Fields inherited from class com.bigdata.jini.start.config.ServiceConfiguration.AbstractServiceStarter |
|---|
listener |
| Constructor Summary | |
|---|---|
protected |
ZookeeperServerConfiguration.ZookeeperServiceStarter(IServiceListener listener,
ZookeeperServerEntry entry)
|
| Method Summary | |
|---|---|
protected void |
addCommandArgs(List<String> cmds)
Extended to add the configuration file on the command line after the class name. |
protected void |
awaitServiceStart(V processHelper,
long timeout,
TimeUnit unit)
Waits a bit to see if the process returns an exit code. |
V |
call()
Start a new instance of the service. |
protected File |
getServiceDir()
Returns the actual service directory, which is dataDir. |
protected V |
newProcessHelper(String className,
ProcessBuilder processBuilder,
IServiceListener listener)
Return the ProcessHelper that will be used to manage the
process. |
protected void |
writeZookeeperConfigFile()
Writes the zookeeper configuration file. |
| Methods inherited from class com.bigdata.jini.start.config.JavaServiceConfiguration.JavaServiceStarter |
|---|
addCommand, setUp, setUpEnvironment |
| Methods inherited from class com.bigdata.jini.start.config.ServiceConfiguration.AbstractServiceStarter |
|---|
addServiceOptions, getCommandLine, newProcessBuilder, newProcessBuilder, writeStartFile |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ZookeeperServerEntry entry
| Constructor Detail |
|---|
protected ZookeeperServerConfiguration.ZookeeperServiceStarter(IServiceListener listener,
ZookeeperServerEntry entry)
entry - Identifies the specific server instance to start.listener - | Method Detail |
|---|
protected File getServiceDir()
dataDir.
getServiceDir in class ServiceConfiguration.AbstractServiceStarter<V extends ZookeeperProcessHelper>ServiceConfiguration.serviceDir,
ServiceConfiguration.getServiceDir(String, Configuration)
public V call()
throws Exception
ServiceConfiguration.AbstractServiceStarterNote: Output of the child process will be copied onto the output of the parent process. That is where to look for any output that is written onto stdout or stderr. Normally you will want the services to write their logs on a file, syslogd, or an async appender.
call in interface Callable<V extends ZookeeperProcessHelper>call in class ServiceConfiguration.AbstractServiceStarter<V extends ZookeeperProcessHelper>ZookeeperServerConfiguration.ZookeeperRunningException - if zookeeper answers at the client port or otherwise
appears to be running.
Exception - if the service detectably did not start.protected void addCommandArgs(List<String> cmds)
addCommandArgs in class JavaServiceConfiguration.JavaServiceStarter<V extends ZookeeperProcessHelper>
protected V newProcessHelper(String className,
ProcessBuilder processBuilder,
IServiceListener listener)
throws IOException
ServiceConfiguration.AbstractServiceStarterProcessHelper that will be used to manage the
process.
newProcessHelper in class ServiceConfiguration.AbstractServiceStarter<V extends ZookeeperProcessHelper>IOException
protected void awaitServiceStart(V processHelper,
long timeout,
TimeUnit unit)
throws Exception
ServiceConfiguration.AbstractServiceStarterNote: This DOES NOT provide direct confirmation that the service is running in a non-error and available for answering requests. You SHOULD override this method if you have a service specific means of obtaining such confirmation.
awaitServiceStart in class ServiceConfiguration.AbstractServiceStarter<V extends ZookeeperProcessHelper>Exception - If a service start failure could be detected (the caller
will kill the process and log an error if any exception
is thrown).
protected final void writeZookeeperConfigFile()
throws net.jini.config.ConfigurationException,
IOException
net.jini.config.ConfigurationException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||