public abstract class JavaModuleImpl extends ScriptModuleImpl implements JavaModule
| Modifier and Type | Field and Description |
|---|---|
protected static String |
BLJ_OPTIONS
Docker environment variable holding the Docker program switches: "BLJ_OPTIONS"
|
GZIP_EXT, LOG_EXT, PDF_EXT, RETURN, SH_EXT, TAB_DELIM, TSV_EXT, TXT_EXTSCRIPT_BATCH_SIZE, SCRIPT_DEFAULT_HEADER, SCRIPT_NUM_THREADS, SCRIPT_PERMISSIONS, SCRIPT_TIMEOUTMAIN_SCRIPT_PREFIX, OUTPUT_DIR, TEMP_DIR| Constructor and Description |
|---|
JavaModuleImpl() |
| Modifier and Type | Method and Description |
|---|---|
List<List<String>> |
buildScript(List<File> files)
Java script only require 2 lines, one to run the blj_config to update our $PATH and gain access to environment
variables, and then the direct call to the BioLockJ.jar.
|
void |
executeTask()
JavaModules run pure Java code.
If in Docker mode and not in Direct mode, execute BioModule.executeTask() to build the
bash script.If not in Docker mode AND on the cluster AND Config."pipeline.detachJavaModules"="Y" execute
BioModule.executeTask() to build the bash scriptOtherwise, execute runModule() to run the Java code to execute module functionality. |
protected String |
getSource()
Get the program source (either the jar path or main class biolockj.BioLockJ);
|
List<String> |
getWorkerScriptFunctions()
If in Docker mode, set "BLJ_OPTIONS" which will be reference in every worker script when running BioLockJ
in direct mode.
|
boolean |
isValidInputModule(BioModule module)
If module is a
SeqModule input must contain sequence data. |
protected void |
markStatus(String status)
This method sets the module status by saving the indicator file to the module root dir.
|
void |
moduleComplete()
This method will create the success flag file so the next module can run.
|
void |
moduleFailed()
This method will create the fail flag file so the pipeline can move on..
|
abstract void |
runModule()
This method executes the modules primary Java routine.
|
buildScriptForPairedReads, checkDependencies, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getSummary, getTimeout, hasScriptscacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getFileCache, getID, getInputFiles, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getTempDir, init, toString, validateFileNameUniqueclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbuildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeoutcheckDependencies, cleanUp, getID, getInputFiles, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getSummary, getTempDir, initprotected static final String BLJ_OPTIONS
public List<List<String>> buildScript(List<File> files) throws Exception
buildScript in interface ScriptModulebuildScript in class ScriptModuleImplfiles - Files in the input directory that contain only forward readsException - if unable to generate script linespublic void executeTask()
throws Exception
BioModule.executeTask() to build the
bash script.Config."pipeline.detachJavaModules"="Y" execute
BioModule.executeTask() to build the bash scriptrunModule() to run the Java code to execute module functionality.executeTask in interface BioModuleexecuteTask in class ScriptModuleImplException - thrown if the module is unable to complete is taskpublic List<String> getWorkerScriptFunctions() throws Exception
getWorkerScriptFunctions in interface ScriptModulegetWorkerScriptFunctions in class ScriptModuleImplException - if errors occurpublic boolean isValidInputModule(BioModule module)
SeqModule input must contain sequence data.isValidInputModule in interface BioModuleisValidInputModule in class BioModuleImplmodule - BioModule that ran before the current BioModulepublic void moduleComplete()
throws Exception
JavaModulemoduleComplete in interface JavaModuleException - thrown if any runtime error occurspublic void moduleFailed()
throws Exception
JavaModulemoduleFailed in interface JavaModuleException - thrown if any runtime error occurspublic abstract void runModule()
throws Exception
JavaModulerunModule in interface JavaModuleException - thrown if any runtime error occursprotected final String getSource() throws Exception
Exception - if unable to determine source