Class TaskContextImpl
java.lang.Object
fr.ens.biologie.genomique.eoulsan.core.workflow.TaskContextImpl
- All Implemented Interfaces:
StepConfigurationContext,TaskContext,Serializable
This class define a task context.
- Since:
- 2.0
- Author:
- Laurent Jourdren
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic TaskContextImpldeserialize(DataFile file) Deserialize the TaskContext object.static TaskContextImpldeserialize(File file) Deserialize the TaskContext object.static TaskContextImplDeserialize the TaskContext object.static TaskContextImpldeserialize(Path file) Deserialize the TaskContext object.voidDeserialize output data.voiddeserializeOutputData(File file) Deserialize output data.voidDeserialize output data.voiddeserializeOutputData(Path file) Deserialize output data.Get the command author.Get command description.Get the command name.longGet the creation time of the context.Get the context name.Get the current step.Get the data repository directory.Get the design file path.fr.ens.biologie.genomique.kenetre.log.GenericLoggerGet the generic logger.Get the Hadoop working directory.intgetId()getInputData(InputPort port) Get raw access to input data stored in the object.getInputData(DataFormat format) Get the input data for an input DataType and a Sample.getInputData(String portName) Get the input data for a port name and a Sample.Get the application jar path.Get the job description.Get the job directory.Get the job environment.Get the host of the job.getJobId()Get the job id.Get the UUID of the job.Get local temporary directory.Get the local working directory.Get the logger.getOutputData(DataFormat format, Data origin) Get the output data for an input DataType and a Sample.getOutputData(DataFormat format, String dataName) Get the output data for an input DataType and a Sample.getOutputData(DataFormat format, String dataName, int part) Get the output data for an input DataType and a Sample.getOutputData(String portName, Data origin) Get the output data for a port name and a Sample.getOutputData(String portName, String dataName) Get the output data for a port name and a Sample.getOutputData(String portName, String dataName, int part) Get the output data for a port name and a Sample.Get the output path.Get EoulsanRuntime.Get Eoulsan settings.Get the step working directory.Create the prefix of a related task file.Get the task output directory.Get the workflow descriptionGet the workflow file path.voidSerialize the TaskContext object.voidSerialize the TaskContext object.voidserialize(OutputStream out) Serialize the TaskContext object.voidSerialize the TaskContext object.voidserializeOutputData(DataFile file) Serialize output data.voidserializeOutputData(File file) Serialize output data.voidSerialize output data.voidserializeOutputData(Path file) Serialize output data.voidsetContextName(String contextName) Set the context name.toString()
-
Method Details
-
getId
public int getId() -
getContextName
Description copied from interface:TaskContextGet the context name.- Specified by:
getContextNamein interfaceTaskContext- Returns:
- a String with the context name
-
getLocalWorkingPathname
Get the local working directory.- Returns:
- Returns the local working directory
-
getHadoopWorkingPathname
Get the Hadoop working directory.- Returns:
- Returns the Hadoop working directory
-
getJobDirectory
Get the job directory.- Specified by:
getJobDirectoryin interfaceStepConfigurationContext- Returns:
- Returns the job directory
-
getTaskOutputDirectory
Get the task output directory.- Returns:
- Returns the task output directory
-
getDataRepositoryDirectory
Get the data repository directory.- Returns:
- Returns the data repository directory
-
getOutputDirectory
Description copied from interface:StepConfigurationContextGet the output path.- Specified by:
getOutputDirectoryin interfaceStepConfigurationContext- Returns:
- Returns the output Path
-
getStepOutputDirectory
Description copied from interface:StepConfigurationContextGet the step working directory.- Specified by:
getStepOutputDirectoryin interfaceStepConfigurationContext- Returns:
- Returns the step working directory
-
getJobId
Description copied from interface:StepConfigurationContextGet the job id.- Specified by:
getJobIdin interfaceStepConfigurationContext- Returns:
- the job id
-
getJobHost
Description copied from interface:StepConfigurationContextGet the host of the job.- Specified by:
getJobHostin interfaceStepConfigurationContext- Returns:
- a string with the host of the job
-
getContextCreationTime
public long getContextCreationTime()Description copied from interface:TaskContextGet the creation time of the context.- Specified by:
getContextCreationTimein interfaceTaskContext- Returns:
- the creation time of the context in milliseconds since epoch (1.1.1970)
-
getDesignFile
Description copied from interface:StepConfigurationContextGet the design file path.- Specified by:
getDesignFilein interfaceStepConfigurationContext- Returns:
- the design file path
-
getWorkflowFile
Description copied from interface:StepConfigurationContextGet the workflow file path.- Specified by:
getWorkflowFilein interfaceStepConfigurationContext- Returns:
- the workflow file path
-
getJarPathname
Get the application jar path.- Returns:
- Returns the jar path
-
getJobUUID
Description copied from interface:StepConfigurationContextGet the UUID of the job.- Specified by:
getJobUUIDin interfaceStepConfigurationContext- Returns:
- the job UUID
-
getJobDescription
Description copied from interface:StepConfigurationContextGet the job description.- Specified by:
getJobDescriptionin interfaceStepConfigurationContext- Returns:
- the job description
-
getJobEnvironment
Description copied from interface:StepConfigurationContextGet the job environment.- Specified by:
getJobEnvironmentin interfaceStepConfigurationContext- Returns:
- the job environment
-
getCommandName
Description copied from interface:StepConfigurationContextGet the command name.- Specified by:
getCommandNamein interfaceStepConfigurationContext- Returns:
- the command name
-
getCommandDescription
Description copied from interface:StepConfigurationContextGet command description.- Specified by:
getCommandDescriptionin interfaceStepConfigurationContext- Returns:
- the command description
-
getCommandAuthor
Description copied from interface:StepConfigurationContextGet the command author.- Specified by:
getCommandAuthorin interfaceStepConfigurationContext- Returns:
- the command author
-
getWorkflow
Description copied from interface:TaskContextGet the workflow description- Specified by:
getWorkflowin interfaceTaskContext- Returns:
- the workflow description
-
getCurrentStep
Description copied from interface:StepConfigurationContextGet the current step.- Specified by:
getCurrentStepin interfaceStepConfigurationContext- Returns:
- the current Step or null if no Step is currently running.
-
setContextName
Description copied from interface:TaskContextSet the context name.- Specified by:
setContextNamein interfaceTaskContext- Parameters:
contextName- the name of the context
-
getRuntime
Description copied from interface:StepConfigurationContextGet EoulsanRuntime.- Specified by:
getRuntimein interfaceStepConfigurationContext- Returns:
- the EoulsanRuntime
-
getSettings
Description copied from interface:StepConfigurationContextGet Eoulsan settings.- Specified by:
getSettingsin interfaceStepConfigurationContext- Returns:
- the Settings
-
getLogger
Description copied from interface:StepConfigurationContextGet the logger.- Specified by:
getLoggerin interfaceStepConfigurationContext- Returns:
- the logger
-
getGenericLogger
public fr.ens.biologie.genomique.kenetre.log.GenericLogger getGenericLogger()Description copied from interface:StepConfigurationContextGet the generic logger.- Specified by:
getGenericLoggerin interfaceStepConfigurationContext- Returns:
- the generic logger
-
getInputData
Description copied from interface:TaskContextGet the input data for a port name and a Sample.- Specified by:
getInputDatain interfaceTaskContext- Parameters:
portName- the name of the port- Returns:
- a String with the pathname
-
getInputData
Description copied from interface:TaskContextGet the input data for an input DataType and a Sample.- Specified by:
getInputDatain interfaceTaskContext- Parameters:
format- the DataFormat of the source- Returns:
- a String with the pathname
-
getOutputData
Description copied from interface:TaskContextGet the output data for a port name and a Sample.- Specified by:
getOutputDatain interfaceTaskContext- Parameters:
portName- the name of the portdataName- the name of the data- Returns:
- a String with the pathname
-
getOutputData
Description copied from interface:TaskContextGet the output data for a port name and a Sample.- Specified by:
getOutputDatain interfaceTaskContext- Parameters:
portName- the name of the portdataName- the name of the datapart- data part- Returns:
- a String with the pathname
-
getOutputData
Description copied from interface:TaskContextGet the output data for a port name and a Sample.- Specified by:
getOutputDatain interfaceTaskContext- Parameters:
portName- the name of the portorigin- origin of the new data- Returns:
- a String with the pathname
-
getOutputData
Description copied from interface:TaskContextGet the output data for an input DataType and a Sample.- Specified by:
getOutputDatain interfaceTaskContext- Parameters:
format- the DataFormat of the sourcedataName- the name of the data- Returns:
- a String with the pathname
-
getOutputData
Description copied from interface:TaskContextGet the output data for an input DataType and a Sample.- Specified by:
getOutputDatain interfaceTaskContext- Parameters:
format- the DataFormat of the sourcedataName- the name of the datapart- data part- Returns:
- a String with the pathname
-
getOutputData
Description copied from interface:TaskContextGet the output data for an input DataType and a Sample.- Specified by:
getOutputDatain interfaceTaskContext- Parameters:
format- the DataFormat of the sourceorigin- origin of the new data- Returns:
- a String with the pathname
-
getLocalTempDirectory
Description copied from interface:StepConfigurationContextGet local temporary directory.- Specified by:
getLocalTempDirectoryin interfaceStepConfigurationContext- Returns:
- the local temporary directory
-
getTaskFilePrefix
Create the prefix of a related task file.- Returns:
- a string with the prefix of the task file
-
getInputData
Get raw access to input data stored in the object.- Parameters:
port- name of the input port- Returns:
- a Data object
-
toString
-
serialize
Serialize the TaskContext object.- Parameters:
file- output DataFile- Throws:
IOException- if an error occurs while creating the file
-
serialize
Serialize the TaskContext object.- Parameters:
file- output DataFile- Throws:
IOException- if an error occurs while creating the file
-
serialize
Serialize the TaskContext object.- Parameters:
file- output DataFile- Throws:
IOException- if an error occurs while creating the file
-
serialize
Serialize the TaskContext object.- Parameters:
out- output stream- Throws:
IOException- if an error occurs while creating the file
-
deserialize
Deserialize the TaskContext object. Warning: this method update the values of the settings of the Eoulsan runtime.- Parameters:
file- input DataFile- Returns:
- a deserialized TaskContextImpl object
- Throws:
IOException- if an error occurs while reading the file
-
deserialize
Deserialize the TaskContext object. Warning: this method update the values of the settings of the Eoulsan runtime.- Parameters:
file- input DataFile- Returns:
- a deserialized TaskContextImpl object
- Throws:
IOException- if an error occurs while reading the file
-
deserialize
Deserialize the TaskContext object. Warning: this method update the values of the settings of the Eoulsan runtime.- Parameters:
file- input DataFile- Returns:
- a deserialized TaskContextImpl object
- Throws:
IOException- if an error occurs while reading the file
-
deserialize
Deserialize the TaskContext object. Warning: this method update the values of the settings of the Eoulsan runtime.- Parameters:
in- input stream- Returns:
- a deserialized TaskContextImpl object
- Throws:
IOException- if an error occurs while reading the file
-
serializeOutputData
Serialize output data.- Parameters:
file- output file- Throws:
IOException- if an error occurs while creating the file
-
serializeOutputData
Serialize output data.- Parameters:
file- output file- Throws:
IOException- if an error occurs while creating the file
-
serializeOutputData
Serialize output data.- Parameters:
file- output DataFile- Throws:
IOException- if an error occurs while creating the file
-
serializeOutputData
Serialize output data.- Parameters:
out- output stream- Throws:
IOException- if an error occurs while creating the file
-
deserializeOutputData
Deserialize output data.- Parameters:
file- input datafile- Throws:
IOException- if an error occurs while reading the file
-
deserializeOutputData
Deserialize output data.- Parameters:
file- input file- Throws:
IOException- if an error occurs while reading the file
-
deserializeOutputData
Deserialize output data.- Parameters:
file- input file- Throws:
IOException- if an error occurs while reading the file
-
deserializeOutputData
Deserialize output data.- Parameters:
in- input stream- Throws:
IOException- if an error occurs while reading the file
-