public class Configurator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLUSTER_WORK_DIRECTORY |
static boolean |
IS_CLUSTER_ENGINE_ENABLED |
static boolean |
IS_LOCAL_ENGINE_ENABLED |
static java.lang.String |
LOCAL_WORK_DIRECTORY |
private static org.apache.log4j.Logger |
log |
private static compbio.util.PropertyHelper |
ph |
Constructor and Description |
---|
Configurator() |
Modifier and Type | Method and Description |
---|---|
static <T> ConfiguredExecutable<T> |
configureExecutable(Executable<T> executable) |
static <T> ConfiguredExecutable<T> |
configureExecutable(Executable<T> executable,
Executable.ExecProvider provider) |
static <T> ConfiguredExecutable<T> |
configureExecutable(Executable<T> executable,
java.util.List<FastaSequence> dataSet) |
static AsyncExecutor |
getAsyncEngine(ConfiguredExecutable<?> executable) |
static AsyncExecutor |
getAsyncEngine(ConfiguredExecutable<?> executable,
Executable.ExecProvider provider) |
static AsyncExecutor |
getAsyncEngine(java.lang.String taskId) |
(package private) static Executable.ExecProvider |
getExecProvider(ConfiguredExecutable<?> executable,
java.util.List<FastaSequence> dataSet)
Depending on the values defined in the properties
(engine.cluster.enable=true and engine.local.enable=true) return either
Cluster job submission engine
#JobRunner or local job submission
engine #LocalRunner If both engines enabled than ask
LoadBalancer for an engine. |
static SyncExecutor |
getSyncEngine(ConfiguredExecutable<?> executable) |
static SyncExecutor |
getSyncEngine(ConfiguredExecutable<?> executable,
Executable.ExecProvider provider) |
static java.lang.String |
getWorkDirectory(java.lang.String taskId) |
private static boolean |
initBooleanValue(java.lang.String key) |
private static java.lang.String |
initClusterWorkDirectory() |
private static java.lang.String |
initLocalDirectory() |
(package private) static boolean |
isLocal(java.lang.String taskId) |
(package private) static boolean |
isTargetedForLocalExecution(ConfiguredExecutable<?> executable) |
(package private) static <T> void |
setupWorkDirectory(ConfExecutable<T> confExec,
Executable.ExecProvider provider) |
private static org.apache.log4j.Logger log
private static final compbio.util.PropertyHelper ph
public static final boolean IS_LOCAL_ENGINE_ENABLED
public static final boolean IS_CLUSTER_ENGINE_ENABLED
public static final java.lang.String LOCAL_WORK_DIRECTORY
public static final java.lang.String CLUSTER_WORK_DIRECTORY
private static boolean initBooleanValue(java.lang.String key)
private static java.lang.String initClusterWorkDirectory()
private static java.lang.String initLocalDirectory()
static Executable.ExecProvider getExecProvider(ConfiguredExecutable<?> executable, java.util.List<FastaSequence> dataSet) throws JobSubmissionException
#JobRunner
or local job submission
engine #LocalRunner
If both engines enabled than ask
LoadBalancer
for an engine. This method will fall back and return
local engine if
1) No engines are defined in the properties or they have been defined incorrectly
2) Execution environment is Windows as the system cannot really run
cluster submission from windowsexecutable
- JobSubmissionException
public static <T> ConfiguredExecutable<T> configureExecutable(Executable<T> executable) throws JobSubmissionException
JobSubmissionException
public static <T> ConfiguredExecutable<T> configureExecutable(Executable<T> executable, java.util.List<FastaSequence> dataSet) throws JobSubmissionException
JobSubmissionException
static <T> void setupWorkDirectory(ConfExecutable<T> confExec, Executable.ExecProvider provider)
public static <T> ConfiguredExecutable<T> configureExecutable(Executable<T> executable, Executable.ExecProvider provider) throws JobSubmissionException
JobSubmissionException
public static AsyncExecutor getAsyncEngine(ConfiguredExecutable<?> executable, Executable.ExecProvider provider)
public static SyncExecutor getSyncEngine(ConfiguredExecutable<?> executable, Executable.ExecProvider provider) throws JobSubmissionException
JobSubmissionException
public static AsyncExecutor getAsyncEngine(ConfiguredExecutable<?> executable)
public static AsyncExecutor getAsyncEngine(java.lang.String taskId)
public static SyncExecutor getSyncEngine(ConfiguredExecutable<?> executable) throws JobSubmissionException
JobSubmissionException
static boolean isTargetedForLocalExecution(ConfiguredExecutable<?> executable)
static boolean isLocal(java.lang.String taskId)
public static java.lang.String getWorkDirectory(java.lang.String taskId)