Class Main
java.lang.Object
fr.ens.biologie.genomique.eoulsan.Main
- Direct Known Subclasses:
MainCLI,MainHadoop
This class is the main class. Check the environment, if Hadoop library is in the classpath launch
Hadoop main class else run local main class.
- Since:
- 1.0
- Author:
- Laurent Jourdren
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateLogFileAndFlushLog(URI logFilename) Create a new log file and flush log.voidcreateLogFiles(URI EoulsanlogFilename, URI otherlogFilename) Create the log file for Eoulsan and additional log file for dependencies that use their own logging system.voidcreateOtherLog(URI logFilename) Create the additional log file for dependencies that use their own logging system.voidflushLog()Flush log.Get the action.Get the action arguments.getArgs()Get command line arguments.Get Eoulsan classpath.Get the command line settings arguments.Get the configuration file argument.Get Eoulsan directory.intGet Eoulsan memory requirement.Get Eoulsan script path.static MainGet the instance of the Main class.Get java executable path.Get JVM arguments.Get the launch mode of the application.Get the path to the launch script.Get the log file argument.Get the log level arguments.static voidMain method of the program.
-
Field Details
-
EOULSAN_CLASSPATH_JVM_ARG
- See Also:
-
EOULSAN_SCRIPT
- See Also:
-
EOULSAN_PATH
- See Also:
-
EOULSAN_MEMORY
- See Also:
-
-
Method Details
-
getInstance
Get the instance of the Main class.- Returns:
- a Main object
-
getJavaExecutablePath
Get java executable path.- Returns:
- the path to the java executable
-
getJVMArgs
Get JVM arguments.- Returns:
- the JVM arguments as an array
-
getClassPath
Get Eoulsan classpath. The result of the method is based on the content of the -Deoulsan.hadoop.libs JVM argument.- Returns:
- the JVM class as a String
-
getEoulsanScriptPath
Get Eoulsan script path.- Returns:
- the Eoulsan script path
-
getEoulsanMemory
public int getEoulsanMemory()Get Eoulsan memory requirement.- Returns:
- the Eoulsan memory requirement
-
getEoulsanDirectory
Get Eoulsan directory.- Returns:
- the Eoulsan directory
-
getArgs
Get command line arguments.- Returns:
- Returns the arguments
-
getAction
Get the action.- Returns:
- Returns the action
-
getActionArgs
Get the action arguments.- Returns:
- Returns the actionArgs
-
getLogLevelArgument
Get the log level arguments.- Returns:
- Returns the logLevel
-
getLogFileArgument
Get the log file argument.- Returns:
- Returns the log
-
getConfigurationFileArgument
Get the configuration file argument.- Returns:
- Returns the configuration file
-
getCommandLineSettings
Get the command line settings arguments.- Returns:
- a list with the settings defined in the command line
-
getLaunchScriptPath
Get the path to the launch script.- Returns:
- the path to the launch script or null if no launch script has been used
-
getLaunchMode
Get the launch mode of the application.- Returns:
- the launch mode of the application
-
createLogFileAndFlushLog
Create a new log file and flush log.- Parameters:
logFilename- log file name- Throws:
EoulsanException- if an error occurs while creating log file
-
createOtherLog
Create the additional log file for dependencies that use their own logging system.- Parameters:
logFilename- the log file name
-
createLogFiles
Create the log file for Eoulsan and additional log file for dependencies that use their own logging system.- Parameters:
EoulsanlogFilename- Eoulsan log file nameotherlogFilename- other log file name- Throws:
EoulsanException- if an error occurs while creating log file
-
flushLog
public void flushLog()Flush log. -
main
Main method of the program.- Parameters:
args- command line arguments
-