public class BundleEngine extends BaseEngine
USE_XCOMMAND, user| Constructor and Description |
|---|
BundleEngine()
Create a system Bundle engine, with no user and no group.
|
BundleEngine(String user)
Create a Bundle engine to perform operations on behave of a user.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
BulkResponseInfo |
getBulkJobs(String bulkFilter,
int start,
int len)
Get bulk job response
|
BundleJobBean |
getBundleJob(String jobId) |
BundleJobInfo |
getBundleJobs(String filter,
int start,
int len)
Get bundle jobs
|
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,
boolean desc)
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 wf job.
|
org.apache.oozie.client.WorkflowJob |
getJob(String jobId,
int start,
int length)
Return the info about a wf job with actions subset.
|
String |
getJobIdForExternalId(String externalId)
Return the workflow Job ID for an external ID.
|
void |
kill(String jobId)
Kill a job.
|
static Map<String,List<String>> |
parseBulkFilter(String bulkParams)
Parse filter string to a map with key = filter name and values = filter values
Allowed keys are defined as constants on top
|
void |
reRun(String jobId,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
|
void |
reRun(String jobId,
String coordScope,
String dateScope,
boolean refresh,
boolean noCleanup)
Rerun Bundle actions for given rerunType
|
void |
resume(String jobId)
Resume a job.
|
void |
start(String jobId)
Start a job.
|
void |
streamLog(String jobId,
Writer writer,
Map<String,String[]> params)
Stream the log of a job.
|
String |
submitJob(org.apache.hadoop.conf.Configuration conf,
boolean startJob)
Submit a job.
|
void |
suspend(String jobId)
Suspend a job.
|
getJMSTopicName, getUserpublic BundleEngine()
public BundleEngine(String user)
user - user name.public void change(String jobId, String changeValue) throws BundleEngineException
BaseEnginechange in class BaseEnginejobId - job Id.changeValue - change value.BundleEngineExceptionpublic String dryRunSubmit(org.apache.hadoop.conf.Configuration conf) throws BundleEngineException
BaseEnginedryRunSubmit in class BaseEngineconf - job configuration.BundleEngineExceptionpublic org.apache.oozie.client.CoordinatorJob getCoordJob(String jobId) throws BundleEngineException
BaseEnginegetCoordJob in class BaseEnginejobId - job Id.BundleEngineExceptionpublic BundleJobBean getBundleJob(String jobId) throws BundleEngineException
BundleEngineExceptionpublic org.apache.oozie.client.CoordinatorJob getCoordJob(String jobId, String filter, int start, int length, boolean desc) throws BundleEngineException
BaseEnginegetCoordJob 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 returnedBundleEngineExceptionpublic String getDefinition(String jobId) throws BundleEngineException
BaseEnginegetDefinition in class BaseEnginejobId - job Id.BundleEngineExceptionpublic org.apache.oozie.client.WorkflowJob getJob(String jobId) throws BundleEngineException
BaseEnginegetJob in class BaseEnginejobId - job Id.BundleEngineExceptionpublic org.apache.oozie.client.WorkflowJob getJob(String jobId, int start, int length) throws BundleEngineException
BaseEnginegetJob in class BaseEnginejobId - job Idstart - starting from this index in the list of actions belonging to the joblength - number of actions to be returnedBundleEngineExceptionpublic String getJobIdForExternalId(String externalId) throws BundleEngineException
BaseEnginegetJobIdForExternalId in class BaseEngineexternalId - external ID provided at job submission time.null if none.BundleEngineExceptionpublic void kill(String jobId) throws BundleEngineException
BaseEnginekill in class BaseEnginejobId - job Id.BundleEngineException@Deprecated public void reRun(String jobId, org.apache.hadoop.conf.Configuration conf) throws BundleEngineException
BaseEnginereRun in class BaseEnginejobId - job Id to rerun.conf - configuration information for the rerun.BundleEngineExceptionpublic void reRun(String jobId, String coordScope, String dateScope, boolean refresh, boolean noCleanup) throws BaseEngineException
jobId - bundle job idcoordScope - the rerun scope for coordinator job names separated by ","dateScope - the rerun scope for coordinator nominal times separated by ","refresh - true if user wants to refresh input/outpur dataset urlsnoCleanup - false if user wants to cleanup output events for given rerun actionsBaseEngineException - thrown if failed to rerunpublic void resume(String jobId) throws BundleEngineException
BaseEngineresume in class BaseEnginejobId - job Id.BundleEngineExceptionpublic void start(String jobId) throws BundleEngineException
BaseEnginestart in class BaseEnginejobId - job Id.BundleEngineExceptionpublic void streamLog(String jobId, Writer writer, Map<String,String[]> params) throws IOException, BundleEngineException
BaseEnginestreamLog in class BaseEnginejobId - job Id.writer - writer to stream the log to.params - additional parameters from the requestIOException - thrown if the log cannot be streamed.BundleEngineExceptionpublic String submitJob(org.apache.hadoop.conf.Configuration conf, boolean startJob) throws BundleEngineException
BaseEnginesubmitJob in class BaseEngineconf - job configuration.startJob - indicates if the job should be started or not.BundleEngineExceptionpublic void suspend(String jobId) throws BundleEngineException
BaseEnginesuspend in class BaseEnginejobId - job Id.BundleEngineExceptionpublic BundleJobInfo getBundleJobs(String filter, int start, int len) throws BundleEngineException
filter - the filter stringstart - start location for paginglen - total length to getBundleEngineException - thrown if failed to get bundle job infopublic BulkResponseInfo getBulkJobs(String bulkFilter, int start, int len) throws BundleEngineException
filter - the filter stringstart - start location for paginglen - total length to getBundleEngineException - thrown if failed to get bulk job infopublic static Map<String,List<String>> parseBulkFilter(String bulkParams) throws BundleEngineException
filter - the filter stringBundleEngineException - thrown if failed to parse filter stringCopyright © 2014 Apache Software Foundation. All Rights Reserved.