public class Pipeline extends Object
Modifier and Type | Method and Description |
---|---|
protected static void |
deleteIncompleteModule(BioModule module)
Delete and recreate incomplete module directory.
|
static void |
executeModule(BioModule module)
Execute a single pipeline module.
|
protected static void |
executeModules()
This method executes all new and incomplete modules
Before/after a module is executed, set persistent module status by creating status indicator files. |
protected static File |
getMetadata(BioModule bioModule)
If the bioModule is complete and contains a metadata file in its output directory, return the metadata file,
since it must be a new version.
|
static List<BioModule> |
getModules()
Return a list of
BioModule s constructed by the BioModuleFactory |
static String |
getStatus()
Return if no pipelineException has been thrown, otherwise return
|
protected static boolean |
initializeModules()
Initialization occurs by calling
BioModule methods on configured modulesCreate module sub-directories under "internal.pipelineDir" as ordered in Config file.Reset the SummaryUtil module so previous summary descriptions can be used for completed
modules
Delete incomplete module contents if restarting a failed pipeline
"output" directoryCall refreshOutputMetadata(BioModule) to cache metadata if output by a complete moduleCall refreshRCacheIfNeeded(BioModule) to cache R fields after 1st R module runsVerify dependencies with BioModule.checkDependencies() |
static void |
initializePipeline()
This method initializes the Pipeline by building the modules and checking module dependencies.
|
protected static boolean |
poll(ScriptModule module)
The
ScriptModule.getScriptDir() will contain one main script and one ore more worker
scripts.An empty file with appended to the script name is created when execution begins. If successful, an empty file with appended to the script name is created. Upon failure, an empty file with appended to the script name is created. Script status is polled each minute, determining status by counting indicator files. Log outputs the # of started, failed, and successful scripts (if any change).Log repeats the previous message every 10 minutes if no status change is detected. |
protected static void |
refreshOutputMetadata(BioModule module)
Call
MetaUtil to refresh the metadata cache if a new metadata file was output by the
bioModule . |
protected static void |
refreshRCacheIfNeeded(BioModule module)
Refresh R cache if about to run the 1st R module.
|
static void |
runDirectModule(Integer moduleID)
If moduleName is null, run all modules, otherwise only run the specified module.
|
static void |
startPipeline()
This method initializes and executes the BioModules set in the BioLockJ configuration file.
|
public static void executeModule(BioModule module) throws Exception
module
- BioModule current moduleException
- if runtime errors occurpublic static List<BioModule> getModules()
BioModule
s constructed by the BioModuleFactory
public static String getStatus()
public static void initializePipeline() throws Exception
Exception
- if errors occurpublic static void runDirectModule(Integer moduleID) throws Exception
moduleID
- of a single module to runException
- if any fatal error occurs during executionpublic static void startPipeline() throws Exception
Exception
- if any fatal error occurs during executionprotected static void deleteIncompleteModule(BioModule module) throws Exception
module
- BioModuleException
- if errors occurprotected static void executeModules() throws Exception
BioModule
s are run in the order listed in the Config
file.Execution steps:
refreshOutputMetadata(BioModule)
to cache updated metadata, if generatede.
Exception
- if script errors occurprotected static File getMetadata(BioModule bioModule)
bioModule
- BioModuleprotected static boolean initializeModules() throws Exception
BioModule
methods on configured modulesConfig
file.SummaryUtil
module so previous summary descriptions can be used for completed
modules
refreshOutputMetadata(BioModule)
to cache metadata if output by a complete modulerefreshRCacheIfNeeded(BioModule)
to cache R fields after 1st R module runsBioModule.checkDependencies()
Exception
- thrown if propagated by called methodsprotected static boolean poll(ScriptModule module) throws Exception
ScriptModule.getScriptDir()
will contain one main script and one ore more worker
scripts.Log
outputs the # of started, failed, and successful scripts (if any change).Log
repeats the previous message every 10 minutes if no status change is detected.module
- ScriptModuleException
- thrown to end pipeline executionprotected static void refreshOutputMetadata(BioModule module) throws Exception
MetaUtil
to refresh the metadata cache if a new metadata file was output by the
bioModule .module
- BioModuleException
- if unable to refresh the cache