falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject falcon git commit: FALCON-1986 logFile retrieved when getting process instance status should be a link that points to logs
Date Wed, 08 Jun 2016 18:12:03 GMT
Repository: falcon
Updated Branches:
  refs/heads/master a4e18a4d4 -> 32be559a0


FALCON-1986 logFile retrieved when getting process instance status should 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


Project: http://git-wip-us.apache.org/repos/asf/falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/32be559a
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/32be559a
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/32be559a

Branch: refs/heads/master
Commit: 32be559a061e209b0fe183cf825be21ae4193136
Parents: a4e18a4
Author: Pallavi Rao <pallavi.rao@inmobi.com>
Authored: Wed Jun 8 11:12:18 2016 -0700
Committer: bvellanki <bvellanki@hortonworks.com>
Committed: Wed Jun 8 11:12:18 2016 -0700

----------------------------------------------------------------------
 .../apache/falcon/workflow/engine/OozieWorkflowEngine.java  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/32be559a/oozie/src/main/java/org/apache/falcon/workflow/engine/OozieWorkflowEngine.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/falcon/workflow/engine/OozieWorkflowEngine.java
b/oozie/src/main/java/org/apache/falcon/workflow/engine/OozieWorkflowEngine.java
index 25f7180..c35f607 100644
--- a/oozie/src/main/java/org/apache/falcon/workflow/engine/OozieWorkflowEngine.java
+++ b/oozie/src/main/java/org/apache/falcon/workflow/engine/OozieWorkflowEngine.java
@@ -892,7 +892,7 @@ public class OozieWorkflowEngine extends AbstractWorkflowEngine {
                     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 @@ public class OozieWorkflowEngine extends AbstractWorkflowEngine {
             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 @@ public class OozieWorkflowEngine extends AbstractWorkflowEngine {
         }
     }
 
+    // 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 {


Mime
View raw message