use of org.apache.oozie.client.WorkflowAction in project oozie by apache.
the class TestSparkActionExecutor method submitAction.
protected String submitAction(Context context) throws Exception {
SparkActionExecutor ae = new SparkActionExecutor();
WorkflowAction action = context.getAction();
ae.prepareActionDir(getFileSystem(), context);
ae.submitLauncher(getFileSystem(), context, action);
String jobId = action.getExternalId();
String jobTracker = action.getTrackerUri();
String consoleUrl = action.getConsoleUrl();
assertNotNull(jobId);
assertNotNull(jobTracker);
assertNotNull(consoleUrl);
return jobId;
}
use of org.apache.oozie.client.WorkflowAction in project oozie by apache.
the class TestHive2ActionExecutor method submitAction.
private String submitAction(Context context, Namespace ns) throws Exception {
Hive2ActionExecutor ae = new Hive2ActionExecutor();
WorkflowAction action = context.getAction();
ae.prepareActionDir(getFileSystem(), context);
ae.submitLauncher(getFileSystem(), context, action);
String jobId = action.getExternalId();
String jobTracker = action.getTrackerUri();
String consoleUrl = action.getConsoleUrl();
assertNotNull(jobId);
assertNotNull(jobTracker);
assertNotNull(consoleUrl);
return jobId;
}
use of org.apache.oozie.client.WorkflowAction in project oozie by apache.
the class AppInfoCollector method persistWorkflowJobInfo.
private void persistWorkflowJobInfo(int maxChildActions, final File resolvedActionsDir, final WorkflowJob job, final DiagBundleEntryWriter bundleEntryWriter) throws IOException {
bundleEntryWriter.writeString("WORKFLOW\n").writeString("--------\n").writeStringValue("Workflow Id : ", job.getId()).writeStringValue("Name : ", job.getAppName()).writeStringValue("App Path : ", job.getAppPath()).writeStringValue("User : ", job.getUser()).writeStringValue("ACL : ", job.getAcl()).writeStringValue("Status : ", job.getStatus().toString()).writeStringValue("Console URL : ", job.getConsoleUrl()).writeStringValue("External Id : ", job.getExternalId()).writeStringValue("Parent Id : ", job.getParentId()).writeDateValue("Created Time : ", job.getCreatedTime()).writeDateValue("End Time : ", job.getEndTime()).writeDateValue("Last Modified Time : ", job.getLastModifiedTime()).writeDateValue("Start Time : ", job.getStartTime()).writeIntValue("Run : ", job.getRun()).writeIntValue("Action Count : ", job.getActions().size()).writeNewLine().writeString("ACTIONS\n").writeString("------\n").flush();
final List<WorkflowAction> workflowActions = job.getActions();
for (int actionCount = 0; actionCount != workflowActions.size() && actionCount < maxChildActions; ++actionCount) {
final WorkflowAction action = workflowActions.get(actionCount);
bundleEntryWriter.writeStringValue("Action Id : ", action.getId()).writeStringValue("Name : ", action.getName()).writeStringValue("Type : ", action.getType()).writeStringValue("Status : ", action.getStatus().toString()).writeStringValue("Transition : ", action.getTransition()).writeDateValue("Start Time : ", action.getStartTime()).writeDateValue("End Time : ", action.getEndTime()).writeStringValue("Error Code : ", action.getErrorCode()).writeStringValue("Error Message : ", action.getErrorMessage()).writeStringValue("Console URL : ", action.getConsoleUrl()).writeStringValue("Tracker URI : ", action.getTrackerUri()).writeStringValue("External Child Ids : ", action.getExternalChildIDs()).writeStringValue("External Id : ", action.getExternalId()).writeStringValue("External Status : ", action.getExternalStatus()).writeStringValue("Data : ", action.getData()).writeStringValue("Stats : ", action.getStats()).writeStringValue("Credentials : ", action.getCred()).writeIntValue("Retries : ", action.getRetries()).writeIntValue("User Retry Int : ", action.getUserRetryInterval()).writeIntValue("User Retry Count : ", action.getUserRetryCount()).writeIntValue("User Retry Max : ", action.getUserRetryMax()).writeNewLine().flush();
final String actionType = action.getType();
persistResolvedActionDefinition(action, resolvedActionsDir);
if (!isControlNode(actionType)) {
// skip control nodes
storeOozieLauncherLog(resolvedActionsDir, action, job.getUser());
}
}
}
use of org.apache.oozie.client.WorkflowAction in project oozie by apache.
the class TestPyspark method submitAction.
protected String submitAction(Context context) throws Exception {
SparkActionExecutor ae = new SparkActionExecutor();
WorkflowAction action = context.getAction();
ae.prepareActionDir(getFileSystem(), context);
ae.submitLauncher(getFileSystem(), context, action);
String jobId = action.getExternalId();
String jobTracker = action.getTrackerUri();
String consoleUrl = action.getConsoleUrl();
assertNotNull(jobId);
assertNotNull(jobTracker);
assertNotNull(consoleUrl);
return jobId;
}
use of org.apache.oozie.client.WorkflowAction in project oozie by apache.
the class TestSqoopActionExecutor method submitAction.
private String submitAction(Context context) throws Exception {
SqoopActionExecutor ae = new SqoopActionExecutor();
WorkflowAction action = context.getAction();
ae.prepareActionDir(getFileSystem(), context);
ae.submitLauncher(getFileSystem(), context, action);
String jobId = action.getExternalId();
String jobTracker = action.getTrackerUri();
String consoleUrl = action.getConsoleUrl();
assertNotNull(jobId);
assertNotNull(jobTracker);
assertNotNull(consoleUrl);
return jobId;
}
Aggregations