|
||||||||||
| 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 provides all the DAG engine functionality for WS calls.
| Field Summary |
|---|
| Fields inherited from class org.apache.oozie.BaseEngine |
|---|
authToken, USE_XCOMMAND, user |
| Constructor Summary | |
|---|---|
DagEngine()
Create a system Dag engine, with no user and no group. |
|
DagEngine(String user,
String authToken)
Create a Dag engine to perform operations on behave of a user. |
|
| Method Summary | |
|---|---|
void |
change(String jobId,
String changeValue)
Change a coordinator job. |
String |
dryRunSubmit(org.apache.hadoop.conf.Configuration conf)
Dry run a job; like {@link BaseEngine#submitJob(org.apache.hadoop.conf.Configuration, boolean) but doesn't actually execute the job. |
org.apache.oozie.client.CoordinatorJob |
getCoordJob(String jobId)
Return the info about a coord job. |
org.apache.oozie.client.CoordinatorJob |
getCoordJob(String jobId,
String filter,
int start,
int length)
Return the info about a coord job with actions subset. |
String |
getDefinition(String jobId)
Return the a job definition. |
org.apache.oozie.client.WorkflowJob |
getJob(String jobId)
Return the info about a job. |
org.apache.oozie.client.WorkflowJob |
getJob(String jobId,
int start,
int length)
Return the info about a job with actions subset. |
String |
getJobIdForExternalId(String externalId)
Return the workflow Job ID for an external ID. |
WorkflowsInfo |
getJobs(String filter,
int start,
int len)
Return the info about a set of jobs. |
WorkflowActionBean |
getWorkflowAction(String actionId)
|
void |
kill(String jobId)
Kill a job. |
protected Map<String,List<String>> |
parseFilter(String filter)
Validate a jobs filter. |
void |
processCallback(String actionId,
String externalStatus,
Properties actionData)
Process an action callback. |
void |
reRun(String jobId,
org.apache.hadoop.conf.Configuration conf)
Rerun a job. |
void |
resume(String jobId)
Resume a job. |
void |
start(String jobId)
Start a job. |
void |
streamLog(String jobId,
Writer writer)
Stream the log of a job. |
String |
submitHttpJob(org.apache.hadoop.conf.Configuration conf,
String jobType)
Submit a pig/mapreduce job through HTTP. |
String |
submitJob(org.apache.hadoop.conf.Configuration conf,
boolean startJob)
Submit a workflow job. |
void |
suspend(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(String user,
String authToken)
user - user name.authToken - the authentication token.| Method Detail |
|---|
public String submitJob(org.apache.hadoop.conf.Configuration conf,
boolean startJob)
throws DagEngineException
submitJob in class BaseEngineconf - job configuration.startJob - indicates if the job should be started or not.
DagEngineException - thrown if the job could not be created.
public String submitHttpJob(org.apache.hadoop.conf.Configuration conf,
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 void start(String jobId)
throws DagEngineException
start in class BaseEnginejobId - job Id.
DagEngineException - thrown if the job could not be started.
public void resume(String jobId)
throws DagEngineException
resume in class BaseEnginejobId - job Id.
DagEngineException - thrown if the job could not be resumed.
public void suspend(String jobId)
throws DagEngineException
suspend in class BaseEnginejobId - job Id.
DagEngineException - thrown if the job could not be suspended.
public void kill(String jobId)
throws DagEngineException
kill in class BaseEnginejobId - job Id.
DagEngineException - thrown if the job could not be killed.
public void change(String jobId,
String changeValue)
throws DagEngineException
BaseEngine
change in class BaseEnginejobId - job Id.changeValue - change value.
DagEngineException
public void reRun(String jobId,
org.apache.hadoop.conf.Configuration conf)
throws DagEngineException
reRun in class BaseEnginejobId - job Id to rerun.conf - configuration information for the rerun.
DagEngineException - thrown if the job could not be rerun.
public void processCallback(String actionId,
String externalStatus,
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 org.apache.oozie.client.WorkflowJob getJob(String jobId)
throws DagEngineException
getJob in class BaseEnginejobId - job Id.
DagEngineException - thrown if the job info could not be obtained.
public org.apache.oozie.client.WorkflowJob getJob(String jobId,
int start,
int length)
throws DagEngineException
getJob in class BaseEnginejobId - 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 String getDefinition(String jobId)
throws DagEngineException
getDefinition in class BaseEnginejobId - job Id.
DagEngineException - thrown if the job definition could no be obtained.
public void streamLog(String jobId,
Writer writer)
throws IOException,
DagEngineException
streamLog in class BaseEnginejobId - job Id.writer - writer to stream the log to.
IOException - thrown if the log cannot be streamed.
DagEngineException - thrown if there is error in getting the Workflow Information for jobId.
protected Map<String,List<String>> parseFilter(String filter)
throws DagEngineException
filter - filter to validate.
DagEngineException - thrown if the filter is invalid.
public WorkflowsInfo getJobs(String filter,
int start,
int len)
throws DagEngineException
filter - 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 String getJobIdForExternalId(String externalId)
throws DagEngineException
getJobIdForExternalId in class BaseEngineexternalId - external ID provided at job submission time.
null if none.
DagEngineException - thrown if the lookup could not be done.
public org.apache.oozie.client.CoordinatorJob getCoordJob(String jobId)
throws BaseEngineException
BaseEngine
getCoordJob in class BaseEnginejobId - job Id.
BaseEngineException - thrown if the job info could not be obtained.
public org.apache.oozie.client.CoordinatorJob getCoordJob(String jobId,
String filter,
int start,
int length)
throws BaseEngineException
BaseEngine
getCoordJob in class BaseEnginejobId - job Id.filter - the status filterstart - 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(String actionId)
throws BaseEngineException
BaseEngineException
public String dryRunSubmit(org.apache.hadoop.conf.Configuration conf)
throws BaseEngineException
BaseEngine
dryRunSubmit in class BaseEngineconf - job configuration.
BaseEngineException - thrown if there was a problem doing the dryrun
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||