|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.deploy.Machine dk.netarkivet.deploy.LinuxMachine
public class LinuxMachine
A LinuxMachine is the instance of the abstract machine class, which runs the operating system Linux or another Unix dependent operation system. This class only contains the operating system specific functions.
Field Summary |
---|
Fields inherited from class dk.netarkivet.deploy.Machine |
---|
applications, arcDatabaseFile, databaseFile, inheritedLogPropFile, inheritedSecurityPolicyFile, jarFolder, log, machineDirectory, machineParameters, machineRoot, name, netarchiveSuiteFileName, operatingSystem, resetTempDir, scriptExtension, settings |
Constructor Summary | |
---|---|
LinuxMachine(org.dom4j.Element subTreeRoot,
XmlStructure parentSettings,
Parameters param,
java.lang.String netarchiveSuiteSource,
java.io.File logProp,
java.io.File securityPolicy,
java.io.File dbFile,
java.io.File arcdbFile,
boolean resetDir,
java.io.File externalJarFolder)
The constructor. |
Method Summary | |
---|---|
protected java.lang.String |
callKillArchiveDatabase()
Method for generating the command for running the external_database_kill script. |
protected java.lang.String |
callKillHarvestDatabase()
Method for generating the command for running the external_database_kill script. |
protected java.lang.String |
callStartArchiveDatabase()
Method for generating the command for running the external_admin_database_start script. |
protected java.lang.String |
callStartHarvestDatabase()
Method for generating the command for running the external_harvest_database_start script. |
protected java.lang.String |
changeFileDirPathForSecurity(java.lang.String path)
Changes the file directory path to the format used in the security policy. |
protected void |
createApplicationKillScripts(java.io.File directory)
Creates the kill scripts for all the applications. |
protected void |
createApplicationStartScripts(java.io.File directory)
Creates the start scripts for all the applications. |
protected void |
createArchiveDatabaseKillScript(java.io.File dir)
Creates a script for killing the archive database on a given machine. |
protected void |
createArchiveDatabaseStartScript(java.io.File dir)
Creates a script for starting the archive database on a given machine. |
protected void |
createHarvestDatabaseKillScript(java.io.File dir)
Creates a script for killing the harvest database on a given machine. |
protected void |
createHarvestDatabaseStartScript(java.io.File dir)
Creates a script for starting the harvest database on a given machine. |
protected void |
createInstallDirScript(java.io.File dir)
Dummy function on linux machine. |
protected void |
createOSLocalKillAllScript(java.io.File directory)
This function creates the script to kill all applications on this machine. |
protected void |
createOSLocalStartAllScript(java.io.File directory)
This function creates the script to start all applications on this machine. |
protected java.lang.String |
createPathToDir(java.lang.String dir)
Function for creating the directories along the path until the end directory. |
protected void |
createRestartScript(java.io.File dir)
Creates script for restarting all the applications on a machine. |
protected java.lang.String |
getAppDirectories()
Creates the script for creating the application specified directories. |
protected java.lang.String |
getConfDirPath()
The operation system specific path to the conf directory. |
protected java.lang.String |
getInstallDirPath()
The operation system specific path to the installation directory. |
protected java.lang.String |
getJMXremoteFilesCommand()
This method does the following: Retrieves the path to the jmxremote.access and jmxremote.password files. |
protected java.lang.String |
osGetClassPath(Application app)
Makes all the class paths into the operation system specific syntax, and puts them into a string where they are separated by the operation system specific separator (':' for linux, ';' for windows). |
protected java.lang.String |
osInstallArchiveDatabase()
Checks if a specific directory for the archive database is given in the settings, and thus if the archive database should be installed on this machine. |
protected java.lang.String |
osInstallDatabase()
Checks if a specific directory for the database is given in the settings, and thus if the database should be installed on this machine. |
protected java.lang.String |
osInstallExternalJarFiles()
This function makes the part of the install script for installing the external jar files from within the jarFolder. |
protected java.lang.String |
osInstallScript()
Creates the operation system specific installation script for this machine. |
protected java.lang.String |
osInstallScriptCreateDir()
Creates the specified directories in the deploy-configuration file. |
protected java.lang.String |
osKillScript()
Creates the operation system specific killing script for this machine. |
protected java.lang.String |
osStartScript()
Creates the operation system specific starting script for this machine. |
protected java.lang.String |
scriptCreateDir(java.lang.String dir,
boolean clean)
This functions makes the script for creating the new directories. |
Methods inherited from class dk.netarkivet.deploy.Machine |
---|
createJmxRemoteAccessFile, createJmxRemotePasswordFile, createLogPropertyFiles, createSecurityPolicyFile, getEnvironmentName, getHeritrixLogin, getHeritrixUsername, getMonitorLogin, getMonitorUsername, machineUserLogin, write, writeToGlobalInstallScript, writeToGlobalKillScript, writeToGlobalStartScript |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinuxMachine(org.dom4j.Element subTreeRoot, XmlStructure parentSettings, Parameters param, java.lang.String netarchiveSuiteSource, java.io.File logProp, java.io.File securityPolicy, java.io.File dbFile, java.io.File arcdbFile, boolean resetDir, java.io.File externalJarFolder)
subTreeRoot
- The XML root element.parentSettings
- The Settings to be inherited from the
PhysicalLocation, where this machine is placed.param
- The machine parameters to be inherited from the
PhysicalLocation.netarchiveSuiteSource
- The name of the NetarchiveSuite package
file. Must end with '.zip'.logProp
- The logging property file, to be copied into
machine directory.securityPolicy
- The security policy file, to be copied into
machine directory.dbFile
- The name of the database file.arcdbFile
- The name of the archive file.resetDir
- Whether the temporary directory should be reset.externalJarFolder
- The folder containing the external jar
library files.Method Detail |
---|
protected java.lang.String osInstallScript()
Machine
osInstallScript
in class Machine
protected java.lang.String osKillScript()
Machine
osKillScript
in class Machine
protected java.lang.String osStartScript()
osStartScript
in class Machine
protected java.lang.String getInstallDirPath()
Machine
getInstallDirPath
in class Machine
protected java.lang.String getConfDirPath()
Machine
getConfDirPath
in class Machine
protected void createOSLocalKillAllScript(java.io.File directory) throws IOFailure
createOSLocalKillAllScript
in class Machine
directory
- The directory for this machine (use global variable?).
IOFailure
- If an error occurred during the creation of the local
killall script.protected void createOSLocalStartAllScript(java.io.File directory) throws IOFailure
createOSLocalStartAllScript
in class Machine
directory
- The directory for this machine (use global variable?).
IOFailure
- If an error occurred during the creation of the local
startall script.protected void createApplicationKillScripts(java.io.File directory) throws IOFailure
createApplicationKillScripts
in class Machine
directory
- The directory for this machine (use global variable?).
IOFailure
- If an error occured during the creation of the kill
application script file.protected void createApplicationStartScripts(java.io.File directory) throws IOFailure
createApplicationStartScripts
in class Machine
directory
- The directory for this machine (use global variable?).
IOFailure
- If an error occurred during the creation of the start
application script file.protected java.lang.String osGetClassPath(Application app)
Machine
osGetClassPath
in class Machine
app
- The application which has the class paths.
protected java.lang.String osInstallDatabase()
Machine
osInstallDatabase
in class Machine
protected java.lang.String osInstallExternalJarFiles()
Machine
osInstallExternalJarFiles
in class Machine
protected java.lang.String osInstallArchiveDatabase()
Machine
osInstallArchiveDatabase
in class Machine
protected java.lang.String osInstallScriptCreateDir()
osInstallScriptCreateDir
in class Machine
protected java.lang.String scriptCreateDir(java.lang.String dir, boolean clean)
Machine
scriptCreateDir
in class Machine
dir
- The name of the directory to create.clean
- Whether the directory should be cleaned\reset.
Machine.createInstallDirScript(File)
protected java.lang.String createPathToDir(java.lang.String dir)
dir
- The path to the directory.
protected java.lang.String getAppDirectories()
Machine
getAppDirectories
in class Machine
protected void createInstallDirScript(java.io.File dir)
createInstallDirScript
in class Machine
dir
- The directory to put the file.protected java.lang.String changeFileDirPathForSecurity(java.lang.String path)
Machine
changeFileDirPathForSecurity
in class Machine
path
- The current path.
protected java.lang.String getJMXremoteFilesCommand()
Machine
getJMXremoteFilesCommand
in class Machine
protected void createRestartScript(java.io.File dir) throws IOFailure
createRestartScript
in class Machine
dir
- The directory where the script file will be placed.
IOFailure
- If the restart script cannot be created.protected void createArchiveDatabaseStartScript(java.io.File dir) throws IOFailure
createArchiveDatabaseStartScript
in class Machine
dir
- The directory where the script will be placed.
IOFailure
- If the script cannot be written.protected java.lang.String callStartArchiveDatabase()
protected void createArchiveDatabaseKillScript(java.io.File dir) throws IOFailure
createArchiveDatabaseKillScript
in class Machine
dir
- The directory where the script will be placed.
IOFailure
- If the script cannot be created.protected java.lang.String callKillArchiveDatabase()
protected void createHarvestDatabaseStartScript(java.io.File dir) throws IOFailure
createHarvestDatabaseStartScript
in class Machine
dir
- The directory where the script will be placed.
IOFailure
- If the script cannot be written.protected java.lang.String callStartHarvestDatabase()
protected void createHarvestDatabaseKillScript(java.io.File dir) throws IOFailure
createHarvestDatabaseKillScript
in class Machine
dir
- The directory where the script will be placed.
IOFailure
- If the script cannot be created.protected java.lang.String callKillHarvestDatabase()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |