Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
FALCON-1986 logFile retrieved when getting process instance status sh…
…ould be a link that points to logs

…ould be a link that points to logs

Author: Pallavi Rao <pallavi.rao@inmobi.com>

Reviewers: "Sandeep<sandysmdl@gmail.com>, Peeyush<peeyushb@apache.org>, Balu <balu@apache.org>"

Closes #177 from pallavi-rao/1986

(cherry picked from commit 32be559)
Signed-off-by: Pallavi Rao <pallavi.rao@inmobi.com>
  • Loading branch information
Pallavi Rao committed Jul 14, 2016
1 parent a2db9e4 commit daa21eddd5763372d7111fad22a9003c73eb27c3
Showing 1 changed file with 7 additions and 2 deletions.
@@ -892,7 +892,7 @@ private List<InstancesResult.Instance> getAllInstances(String cluster, Coordinat
if (wfJob!=null) {
newInstance.startTime = wfJob.getStartTime();
newInstance.endTime = wfJob.getEndTime();
newInstance.logFile = coordinatorAction.getId();
newInstance.logFile = getConsoleUrl(cluster, coordinatorAction.getId());
populateInstanceActions(cluster, wfJob, newInstance);
newInstance.status = WorkflowStatus.valueOf(mapActionStatus(wfJob.getStatus().name()));
instanceList.add(newInstance);
@@ -912,7 +912,7 @@ private void performAction(String cluster, JobAction action, CoordinatorAction c
status = jobInfo.getStatus().name();
instance.startTime = jobInfo.getStartTime();
instance.endTime = jobInfo.getEndTime();
instance.logFile = coordinatorAction.getId();
instance.logFile = getConsoleUrl(cluster, coordinatorAction.getId());
instance.runId = jobInfo.getRun();
}

@@ -984,6 +984,11 @@ private void performAction(String cluster, JobAction action, CoordinatorAction c
}
}

// This method is required as the console URL returned by Oozie for Coord Action is NULL
private String getConsoleUrl(String cluster, String actionId) throws FalconException {
return OozieClientFactory.get(cluster).getOozieUrl() + "?job=" + actionId;
}

public CoordinatorAction.Status reRunCoordAction(String cluster, CoordinatorAction coordinatorAction,
Properties props, boolean isForced) throws FalconException {
try {

0 comments on commit daa21ed

Please sign in to comment.