public class OozieWorkflowEngine extends Object implements WorkflowEngine
Constructor and Description |
---|
OozieWorkflowEngine(AbstractWorkflowDataModel objectModel,
boolean useSge,
String threadsSgeParamFormat,
String maxMemorySgeParamFormat,
boolean createDirectories) |
Modifier and Type | Method and Description |
---|---|
static void |
copyFromLocal(org.apache.hadoop.fs.FileSystem fileSystem,
String source,
org.apache.hadoop.fs.Path dstPath) |
String |
getLookupToken()
An engine-specific token for this workflow run that can be used to lookup relevant runtime data.
|
String |
getWorkingDirectory()
The working directory for the prepared workflow run, or null if not yet prepared or if not applicable for the concrete engine.
|
static org.apache.hadoop.conf.Configuration |
initConf(AbstractWorkflowDataModel model) |
static org.apache.hadoop.fs.Path |
initHdfsWorkDir(AbstractWorkflowDataModel model,
org.apache.hadoop.conf.Configuration conf,
File nfsWorkDir) |
static File |
initNfsWorkDir(AbstractWorkflowDataModel model) |
void |
prepareWorkflow(AbstractWorkflowDataModel objectModel)
Prepare the workflow according to the info filled in the input objectModel.
|
ReturnValue |
runWorkflow()
Run the prepared workflow.
|
ReturnValue |
watchWorkflow(String jobToken)
Watch a workflow and return running information until it completes.
|
public OozieWorkflowEngine(AbstractWorkflowDataModel objectModel, boolean useSge, String threadsSgeParamFormat, String maxMemorySgeParamFormat, boolean createDirectories)
objectModel
- useSge
- threadsSgeParamFormat
- maxMemorySgeParamFormat
- createDirectories
- true when creating the engine to launch a jobpublic static File initNfsWorkDir(AbstractWorkflowDataModel model)
public static org.apache.hadoop.conf.Configuration initConf(AbstractWorkflowDataModel model)
public static org.apache.hadoop.fs.Path initHdfsWorkDir(AbstractWorkflowDataModel model, org.apache.hadoop.conf.Configuration conf, File nfsWorkDir)
public void prepareWorkflow(AbstractWorkflowDataModel objectModel)
WorkflowEngine
prepareWorkflow
in interface WorkflowEngine
objectModel
- model of the workflow to prepare to runpublic ReturnValue runWorkflow()
WorkflowEngine
runWorkflow
in interface WorkflowEngine
public ReturnValue watchWorkflow(String jobToken)
WorkflowEngine
watchWorkflow
in interface WorkflowEngine
public String getWorkingDirectory()
WorkflowEngine
getWorkingDirectory
in interface WorkflowEngine
public static void copyFromLocal(org.apache.hadoop.fs.FileSystem fileSystem, String source, org.apache.hadoop.fs.Path dstPath)
public String getLookupToken()
WorkflowEngine
getLookupToken
in interface WorkflowEngine
Copyright © 2015 SeqWare. All rights reserved.