|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.oozie.BaseEngine
org.apache.oozie.DagEngine
public class DagEngine
The DagEngine bean provides all the DAG engine functionality for WS calls.
Field Summary |
---|
Fields inherited from class org.apache.oozie.BaseEngine |
---|
authToken, user |
Constructor Summary | |
---|---|
DagEngine()
Create a system Dag engine, with no user and no group. |
|
DagEngine(java.lang.String user,
java.lang.String authToken)
Create a Dag engine to perform operations on behave of a user. |
Method Summary | |
---|---|
void |
change(java.lang.String jobId,
java.lang.String changeValue)
Change a coordinator job. |
java.lang.String |
dryrunSubmit(org.apache.hadoop.conf.Configuration conf,
boolean startJob)
|
CoordinatorJob |
getCoordJob(java.lang.String jobId)
Return the info about a coord job. |
CoordinatorJob |
getCoordJob(java.lang.String jobId,
int start,
int length)
Return the info about a coord job with actions subset. |
java.lang.String |
getDefinition(java.lang.String jobId)
Return the a job definition. |
WorkflowJob |
getJob(java.lang.String jobId)
Return the info about a job. |
WorkflowJob |
getJob(java.lang.String jobId,
int start,
int length)
Return the info about a job with actions subset. |
java.lang.String |
getJobIdForExternalId(java.lang.String externalId)
Return the workflow Job ID for an external ID. |
WorkflowsInfo |
getJobs(java.lang.String filterStr,
int start,
int len)
Return the info about a set of jobs. |
WorkflowActionBean |
getWorkflowAction(java.lang.String actionId)
|
void |
kill(java.lang.String jobId)
Kill a job. |
static void |
main(java.lang.String[] args)
|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
parseFilter(java.lang.String filter)
Validate a jobs filter. |
void |
processCallback(java.lang.String actionId,
java.lang.String externalStatus,
java.util.Properties actionData)
Process an action callback. |
void |
reRun(java.lang.String jobId,
org.apache.hadoop.conf.Configuration conf)
Rerun a job. |
void |
resume(java.lang.String jobId)
Resume a job. |
void |
start(java.lang.String jobId)
Start a job. |
void |
streamLog(java.lang.String jobId,
java.io.Writer writer)
Stream the log of a job. |
java.lang.String |
submitHttpJob(org.apache.hadoop.conf.Configuration conf,
java.lang.String jobType)
Submit a pig/mapreduce job through HTTP. |
java.lang.String |
submitJob(org.apache.hadoop.conf.Configuration conf,
boolean startJob)
Submit a workflow job. |
void |
suspend(java.lang.String jobId)
Suspend a job. |
Methods inherited from class org.apache.oozie.BaseEngine |
---|
getAuthToken, getUser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DagEngine()
public DagEngine(java.lang.String user, java.lang.String authToken)
user
- user name.authToken
- the authentication token.Method Detail |
---|
public java.lang.String submitJob(org.apache.hadoop.conf.Configuration conf, boolean startJob) throws DagEngineException
submitJob
in class BaseEngine
conf
- job configuration.startJob
- indicates if the job should be started or not.
DagEngineException
- thrown if the job could not be created.public java.lang.String submitHttpJob(org.apache.hadoop.conf.Configuration conf, java.lang.String jobType) throws DagEngineException
conf
- job configuration.jobType
- job type - can be "pig" or "mapreduce".
DagEngineException
- thrown if the job could not be created.public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public void start(java.lang.String jobId) throws DagEngineException
start
in class BaseEngine
jobId
- job Id.
DagEngineException
- thrown if the job could not be started.public void resume(java.lang.String jobId) throws DagEngineException
resume
in class BaseEngine
jobId
- job Id.
DagEngineException
- thrown if the job could not be resumed.public void suspend(java.lang.String jobId) throws DagEngineException
suspend
in class BaseEngine
jobId
- job Id.
DagEngineException
- thrown if the job could not be suspended.public void kill(java.lang.String jobId) throws DagEngineException
kill
in class BaseEngine
jobId
- job Id.
DagEngineException
- thrown if the job could not be killed.public void change(java.lang.String jobId, java.lang.String changeValue) throws DagEngineException
BaseEngine
change
in class BaseEngine
jobId
- job Id.changeValue
- change value.
DagEngineException
public void reRun(java.lang.String jobId, org.apache.hadoop.conf.Configuration conf) throws DagEngineException
reRun
in class BaseEngine
jobId
- job Id to rerun.conf
- configuration information for the rerun.
DagEngineException
- thrown if the job could not be rerun.public void processCallback(java.lang.String actionId, java.lang.String externalStatus, java.util.Properties actionData) throws DagEngineException
actionId
- the action Id.externalStatus
- the action external status.actionData
- the action output data, null
if none.
DagEngineException
- thrown if the callback could not be processed.public WorkflowJob getJob(java.lang.String jobId) throws DagEngineException
getJob
in class BaseEngine
jobId
- job Id.
DagEngineException
- thrown if the job info could not be obtained.public WorkflowJob getJob(java.lang.String jobId, int start, int length) throws DagEngineException
getJob
in class BaseEngine
jobId
- job Idstart
- starting from this index in the list of actions belonging to the joblength
- number of actions to be returned
DagEngineException
- thrown if the job info could not be obtained.public java.lang.String getDefinition(java.lang.String jobId) throws DagEngineException
getDefinition
in class BaseEngine
jobId
- job Id.
DagEngineException
- thrown if the job definition could no be obtained.public void streamLog(java.lang.String jobId, java.io.Writer writer) throws java.io.IOException, DagEngineException
streamLog
in class BaseEngine
jobId
- job Id.writer
- writer to stream the log to.
java.io.IOException
- thrown if the log cannot be streamed.
DagEngineException
- thrown if there is error in getting the Workflow Information for jobId.protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> parseFilter(java.lang.String filter) throws DagEngineException
filter
- filter to validate.
DagEngineException
- thrown if the filter is invalid.public WorkflowsInfo getJobs(java.lang.String filterStr, int start, int len) throws DagEngineException
filterStr
- job filter. Refer to the OozieClient
for the filter syntax.start
- offset, base 1.len
- number of jobs to return.
DagEngineException
- thrown if the jobs info could not be obtained.public java.lang.String getJobIdForExternalId(java.lang.String externalId) throws DagEngineException
getJobIdForExternalId
in class BaseEngine
externalId
- external ID provided at job submission time.
null
if none.
DagEngineException
- thrown if the lookup could not be done.public CoordinatorJob getCoordJob(java.lang.String jobId) throws BaseEngineException
BaseEngine
getCoordJob
in class BaseEngine
jobId
- job Id.
BaseEngineException
- thrown if the job info could not be obtained.public CoordinatorJob getCoordJob(java.lang.String jobId, int start, int length) throws BaseEngineException
BaseEngine
getCoordJob
in class BaseEngine
jobId
- job Id.start
- starting from this index in the list of actions belonging to the joblength
- number of actions to be returned
BaseEngineException
- thrown if the job info could not be obtained.public WorkflowActionBean getWorkflowAction(java.lang.String actionId) throws BaseEngineException
BaseEngineException
public java.lang.String dryrunSubmit(org.apache.hadoop.conf.Configuration conf, boolean startJob) throws BaseEngineException
dryrunSubmit
in class BaseEngine
BaseEngineException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |