|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oozie.client.OozieClient
org.apache.oozie.LocalOozieClientCoord
public class LocalOozieClientCoord
Client API to submit and manage Oozie coordinator jobs against an Oozie intance.
This class is thread safe. Syntax for filter for thegetJobsInfo(String)
getJobsInfo(String, int, int) methods:
[NAME=VALUE][;NAME=VALUE]*.
Valid filter names are:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.oozie.client.OozieClient |
|---|
OozieClient.ClientCallable<T>, OozieClient.SYSTEM_MODE |
| Field Summary |
|---|
| Fields inherited from class org.apache.oozie.client.OozieClient |
|---|
ACTION_MAX_RETRIES, ACTION_NOTIFICATION_URL, ACTION_RETRY_INTERVAL, APP_PATH, CHANGE_VALUE_CONCURRENCY, CHANGE_VALUE_ENDTIME, CHANGE_VALUE_PAUSETIME, COORD_ACTION_NOTIFICATION_URL, COORDINATOR_APP_PATH, EXTERNAL_ID, FILTER_GROUP, FILTER_NAME, FILTER_STATUS, FILTER_USER, GROUP_NAME, LOG_TOKEN, RERUN_SKIP_NODES, USER_NAME, WORKFLOW_NOTIFICATION_URL, WS_PROTOCOL_VERSION, WS_PROTOCOL_VERSION_0 |
| Constructor Summary | |
|---|---|
LocalOozieClientCoord(CoordinatorEngine coordEngine)
Create a coordinator client for Oozie local use. |
|
| Method Summary | |
|---|---|
java.util.Properties |
createConfiguration()
Create an empty configuration with just the OozieClient.USER_NAME set to the
JVM user name and the OozieClient.GROUP_NAME set to 'other'. |
CoordinatorAction |
getCoordActionInfo(java.lang.String actionId)
Get the info of a coordinator action. |
CoordinatorJob |
getCoordJobInfo(java.lang.String jobId)
Get the info of a coordinator job. |
java.util.List<CoordinatorJob> |
getCoordJobsInfo(java.lang.String filter,
int start,
int len)
Return the info of the coordinator jobs that match the filter. |
java.lang.String |
getHeader(java.lang.String name)
Get the value of a set HTTP header from the coordinator instance. |
java.util.Iterator<java.lang.String> |
getHeaderNames()
Return an iterator with all the header names set in the coordinator instance. |
WorkflowJob |
getJobInfo(java.lang.String jobId)
Deprecated. |
java.util.List<WorkflowJob> |
getJobsInfo(java.lang.String filter)
Deprecated. |
java.util.List<WorkflowJob> |
getJobsInfo(java.lang.String filter,
int start,
int len)
Deprecated. |
java.lang.String |
getOozieUrl()
Return the Oozie URL of the coordinator client instance. |
java.lang.String |
getProtocolUrl()
Return the Oozie URL used by the client and server for WS communications. |
void |
kill(java.lang.String jobId)
Kill a coordinator job. |
void |
removeHeader(java.lang.String name)
Remove a HTTP header from the coordinator client instance. |
void |
reRun(java.lang.String jobId,
java.util.Properties conf)
Deprecated. |
java.util.List<JsonCoordinatorAction> |
reRunCoord(java.lang.String jobId,
java.lang.String rerunType,
java.lang.String scope,
boolean refresh,
boolean noCleanup)
Rerun coordinator actions. |
void |
resume(java.lang.String jobId)
Resume a coordinator job. |
java.lang.String |
run(java.util.Properties conf)
Submit and start a coordinator job. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Set a HTTP header to be used in the WS requests by the coordinator instance. |
void |
start(java.lang.String jobId)
Deprecated. |
java.lang.String |
submit(java.util.Properties conf)
Submit a coordinator job. |
void |
suspend(java.lang.String jobId)
Suspend a coordinator job. |
void |
validateWSVersion()
Validate that the Oozie client and server instances are protocol compatible. |
| Methods inherited from class org.apache.oozie.client.OozieClient |
|---|
change, createConnection, dryrun, getClientBuildVersion, getCoordJobInfo, getHeaders, getJobDefinition, getJobId, getJobInfo, getJobLog, getQueueDump, getServerBuildVersion, getSlaInfo, getSystemMode, getWorkflowActionInfo, notEmpty, notNull, setSystemMode, writeToXml |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalOozieClientCoord(CoordinatorEngine coordEngine)
coordEngine - the engine instance to use.| Method Detail |
|---|
public java.lang.String getOozieUrl()
getOozieUrl in class OozieClient
public java.lang.String getProtocolUrl()
throws OozieClientException
getProtocolUrl in class OozieClientOozieClientException - thrown in the client
and the server are not protocol compatible.
public void validateWSVersion()
throws OozieClientException
validateWSVersion in class OozieClientOozieClientException - thrown in the client
and the server are not protocol compatible.public java.util.Properties createConfiguration()
OozieClient.USER_NAME set to the
JVM user name and the OozieClient.GROUP_NAME set to 'other'.
createConfiguration in class OozieClient
public void setHeader(java.lang.String name,
java.lang.String value)
setHeader in class OozieClientname - header name.value - header value.public java.lang.String getHeader(java.lang.String name)
getHeader in class OozieClientname - header name.
null if not set.public void removeHeader(java.lang.String name)
removeHeader in class OozieClientname - header name.public java.util.Iterator<java.lang.String> getHeaderNames()
getHeaderNames in class OozieClient
public java.lang.String submit(java.util.Properties conf)
throws OozieClientException
submit in class OozieClientconf - job configuration.
OozieClientException - thrown if the job
could not be submitted.
@Deprecated
public void start(java.lang.String jobId)
throws OozieClientException
start in class OozieClientjobId - job Id.
OozieClientException - thrown if the job
could not be started.
public java.lang.String run(java.util.Properties conf)
throws OozieClientException
run in class OozieClientconf - job configuration.
OozieClientException - thrown if the job
could not be submitted.
@Deprecated
public void reRun(java.lang.String jobId,
java.util.Properties conf)
throws OozieClientException
reRun in class OozieClientjobId - job Id to rerun.conf - configuration information for the rerun.
OozieClientException - thrown if the job
could not be started.
public java.util.List<JsonCoordinatorAction> reRunCoord(java.lang.String jobId,
java.lang.String rerunType,
java.lang.String scope,
boolean refresh,
boolean noCleanup)
throws OozieClientException
reRunCoord in class OozieClientjobId - coordinator jobIdrerunType - rerun type 'date' if -date is used, 'action-id' if
-action is usedscope - rerun scope for date or actionIdsrefresh - true if -refresh is given in command optionnoCleanup - true if -nocleanup is given in command option
OozieClientException
public void suspend(java.lang.String jobId)
throws OozieClientException
suspend in class OozieClientjobId - job Id.
OozieClientException - thrown if the job
could not be suspended.
public void resume(java.lang.String jobId)
throws OozieClientException
resume in class OozieClientjobId - job Id.
OozieClientException - thrown if the job
could not be resume.
public void kill(java.lang.String jobId)
throws OozieClientException
kill in class OozieClientjobId - job Id.
OozieClientException - thrown if the job
could not be killed.
@Deprecated
public WorkflowJob getJobInfo(java.lang.String jobId)
throws OozieClientException
getJobInfo in class OozieClientjobId - job Id.
OozieClientException - thrown if the job
info could not be retrieved.
public CoordinatorJob getCoordJobInfo(java.lang.String jobId)
throws OozieClientException
getCoordJobInfo in class OozieClientjobId - job Id.
OozieClientException - thrown if the job
info could not be retrieved.
public CoordinatorAction getCoordActionInfo(java.lang.String actionId)
throws OozieClientException
getCoordActionInfo in class OozieClientactionId - Id.
OozieClientException - thrown if the job info could not be
retrieved.
@Deprecated
public java.util.List<WorkflowJob> getJobsInfo(java.lang.String filter,
int start,
int len)
throws OozieClientException
getJobsInfo in class OozieClientfilter - job filter. Refer to the OozieClient for the filter
syntax.start - jobs offset, base 1.len - number of jobs to return.
OozieClientException - thrown if the jobs info could not be
retrieved.
public java.util.List<CoordinatorJob> getCoordJobsInfo(java.lang.String filter,
int start,
int len)
throws OozieClientException
getCoordJobsInfo in class OozieClientfilter - job filter. Refer to the OozieClient for the filter
syntax.start - jobs offset, base 1.len - number of jobs to return.
OozieClientException - thrown if the jobs info could not be
retrieved.
@Deprecated
public java.util.List<WorkflowJob> getJobsInfo(java.lang.String filter)
throws OozieClientException
getJobsInfo in class OozieClientfilter - job filter. Refer to the LocalOozieClient for the
filter syntax.
OozieClientException - thrown if the jobs
info could not be retrieved.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||