public class CassandraNodeSshDriver extends JavaSoftwareProcessSshDriver implements CassandraNodeDriver
CassandraNode
in a Location
accessible over ssh.KEY_VAL_OPT_PREFIXES, MUTUALLY_EXCLUSIVE_OPTS
CHECK_RUNNING, CUSTOMIZING, DEBUG, IGNORE_ENTITY_SSH_FLAGS, INSTALL_INCOMPLETE, INSTALLING, KILLING, LAUNCHING, logSsh, NON_STANDARD_LAYOUT, PID_FILENAME, PROCESS_OWNER, RESTARTING, STOPPING, USE_PID_FILE, VALID_FLAGS
Constructor and Description |
---|
CassandraNodeSshDriver(CassandraNodeImpl entity,
SshMachineLocation machine) |
Modifier and Type | Method and Description |
---|---|
void |
customize() |
ProcessTaskWrapper<java.lang.Integer> |
executeScriptAsync(java.lang.String commands) |
ProcessTaskWrapper<java.lang.Integer> |
executeScriptFromInstalledFileAsync(java.lang.String fileToRun) |
java.lang.String |
getCassandraConfigFileName() |
java.lang.String |
getCassandraConfigTemplateUrl() |
java.lang.String |
getCassandraRackdcConfigFileName() |
java.lang.String |
getCassandraRackdcConfigTemplateUrl() |
java.lang.String |
getClusterName() |
java.lang.String |
getEndpointSnitchName() |
java.lang.Integer |
getGossipPort() |
java.lang.String |
getMirrorUrl() |
java.lang.Integer |
getNativeTransportPort() |
java.lang.String |
getPidFile() |
java.util.Set<java.lang.Integer> |
getPortsUsed() |
java.lang.String |
getResolvedAddress(java.lang.String hostname)
returns the address that the given hostname resolves to at the target
|
java.util.Map<java.lang.String,java.lang.String> |
getShellEnvironment()
Sets all JVM options (-X..
|
java.lang.Integer |
getSslGossipPort() |
java.lang.Integer |
getThriftPort() |
void |
install() |
boolean |
installJava()
Checks for Java 6 or 7, installing Java 7 if neither are found.
|
boolean |
isClustered() |
boolean |
isRunning()
Whether the entity components have started.
|
void |
launch() |
void |
preInstall()
Implement this method in child classes to add some pre-install behavior
|
void |
stop()
Performs software stop (or queues tasks to do this)
|
checkJavaHostnameBug, copyRuntimeResources, getJavaOpts, getJmxContext, getJmxPort, getRmiRegistryPort, installJmxSupport, isJmxEnabled, isJmxSslEnabled, setup
checkNoHostnameBug, copyInstallResources, copyResource, copyResource, execute, execute, execute, getAddress, getExpandedInstallDir, getHostname, getInstallDir, getLocation, getMachine, getRunDir, getSubnetAddress, getSubnetHostname, runPostInstallCommand, runPostLaunchCommand, runPreInstallCommand, runPreLaunchCommand, setExpandedInstallDir
copyPreInstallResources, copyResource, copyResource, copyResource, copyResource, copyResource, copyResource, copyResource, copyTemplate, copyTemplate, copyTemplate, getEntity, getResource, getResourceAsString, getVersion, kill, postLaunch, processTemplate, processTemplate, processTemplate, processTemplate, processTemplateContents, processTemplateContents, rebind, restart, start
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isJmxEnabled
getEntity, kill, rebind, restart, start
getLocation
public CassandraNodeSshDriver(CassandraNodeImpl entity, SshMachineLocation machine)
public java.lang.Integer getGossipPort()
getGossipPort
in interface CassandraNodeDriver
public java.lang.Integer getSslGossipPort()
getSslGossipPort
in interface CassandraNodeDriver
public java.lang.Integer getThriftPort()
getThriftPort
in interface CassandraNodeDriver
public java.lang.Integer getNativeTransportPort()
getNativeTransportPort
in interface CassandraNodeDriver
public java.lang.String getClusterName()
getClusterName
in interface CassandraNodeDriver
public java.lang.String getCassandraConfigTemplateUrl()
getCassandraConfigTemplateUrl
in interface CassandraNodeDriver
public java.lang.String getCassandraConfigFileName()
getCassandraConfigFileName
in interface CassandraNodeDriver
public java.lang.String getEndpointSnitchName()
public java.lang.String getCassandraRackdcConfigTemplateUrl()
public java.lang.String getCassandraRackdcConfigFileName()
public java.lang.String getMirrorUrl()
public boolean installJava()
JavaSoftwareProcessSshDriver
installJava
in class JavaSoftwareProcessSshDriver
JavaSoftwareProcessSshDriver.checkForAndInstallJava(String)
public void preInstall()
AbstractSoftwareProcessDriver
preInstall
in class AbstractSoftwareProcessDriver
public void install()
install
in class AbstractSoftwareProcessDriver
public java.util.Set<java.lang.Integer> getPortsUsed()
getPortsUsed
in class AbstractSoftwareProcessSshDriver
public void customize()
customize
in class AbstractSoftwareProcessDriver
public boolean isClustered()
isClustered
in interface CassandraNodeDriver
public void launch()
launch
in class AbstractSoftwareProcessDriver
public java.lang.String getPidFile()
public boolean isRunning()
SoftwareProcessDriver
isRunning
in interface SoftwareProcessDriver
public void stop()
SoftwareProcessDriver
stop
in interface SoftwareProcessDriver
stop
in class AbstractSoftwareProcessDriver
Startable.stop()
public java.util.Map<java.lang.String,java.lang.String> getShellEnvironment()
JavaSoftwareProcessSshDriver
That variable is constructed from JavaSoftwareProcessSshDriver.getJavaOpts()
, then wrapped _unescaped_ in double quotes. An
error is thrown if there is an unescaped double quote in the string. All other unescaped
characters are permitted, but unless $var expansion or `command` execution is desired (although
this is not confirmed as supported) the generally caller should escape any such characters, for
example using StringEscapes.BashStringEscapes.escapeLiteralForDoubleQuotedBash(String)
.
getShellEnvironment
in class JavaSoftwareProcessSshDriver
SoftwareProcess.SHELL_ENVIRONMENT
public ProcessTaskWrapper<java.lang.Integer> executeScriptAsync(java.lang.String commands)
executeScriptAsync
in interface CassandraNodeDriver
public ProcessTaskWrapper<java.lang.Integer> executeScriptFromInstalledFileAsync(java.lang.String fileToRun)
public java.lang.String getResolvedAddress(java.lang.String hostname)
CassandraNodeDriver
getResolvedAddress
in interface CassandraNodeDriver