You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by sa...@apache.org on 2017/10/09 22:06:45 UTC

oozie git commit: OOZIE-3031 Coord job with only unresolved dependencies doesn't timeout (puru via satishsaley)

Repository: oozie
Updated Branches:
  refs/heads/master 660b3151c -> 0a6f83e62


OOZIE-3031 Coord job with only unresolved dependencies doesn't timeout (puru via satishsaley)


Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/0a6f83e6
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/0a6f83e6
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/0a6f83e6

Branch: refs/heads/master
Commit: 0a6f83e62126c60f9f9f2648368ed8bcf6293876
Parents: 660b315
Author: satishsaley <sa...@apache.org>
Authored: Mon Oct 9 15:01:30 2017 -0700
Committer: satishsaley <sa...@apache.org>
Committed: Mon Oct 9 15:01:30 2017 -0700

----------------------------------------------------------------------
 .../coord/CoordActionInputCheckXCommand.java       |  3 +--
 .../coord/TestCoordActionInputCheckXCommand.java   | 17 +++++++++++++++++
 release-log.txt                                    |  1 +
 3 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/0a6f83e6/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java b/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
index 401b2c7..179cc45 100644
--- a/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
+++ b/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
@@ -172,7 +172,6 @@ public class CoordActionInputCheckXCommand extends CoordinatorXCommand<Void> {
 
 
             boolean status = checkResolvedInput(actionXml, existList, nonExistList, actionConf);
-            String nonExistListStr = nonExistList.toString();
             boolean isPushDependenciesMet = coordPushInputDependency.isDependencyMet();
             if (status && nonResolvedList.length() > 0) {
                 status = (isPushDependenciesMet) ? checkUnResolvedInput(actionXml, actionConf) : false;
@@ -196,7 +195,7 @@ public class CoordActionInputCheckXCommand extends CoordinatorXCommand<Void> {
                 updateCoordAction(coordAction, isChangeInDependency);
             }
             else {
-                if (!nonExistListStr.isEmpty() && isPushDependenciesMet) {
+                if (isPushDependenciesMet) {
                     queue(new CoordActionTimeOutXCommand(coordAction, coordJob.getUser(), coordJob.getAppName()));
                 }
                 else {

http://git-wip-us.apache.org/repos/asf/oozie/blob/0a6f83e6/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java b/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java
index 9f20942..96ac195 100644
--- a/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java
+++ b/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java
@@ -755,6 +755,23 @@ public class TestCoordActionInputCheckXCommand extends XDataTestCase {
     }
 
     @Test
+    public void testTimeoutWithUnResolved() throws Exception {
+        String jobId = "0000000-" + new Date().getTime() + "-TestCoordActionInputCheckXCommand-C";
+        Date startTime = DateUtils.parseDateOozieTZ("2009-02-15T23:59" + TZ);
+        Date endTime = DateUtils.parseDateOozieTZ("2009-02-16T23:59" + TZ);
+        CoordinatorJobBean job = addRecordToCoordJobTable(jobId, startTime, endTime, "latest");
+        new CoordMaterializeTransitionXCommand(job.getId(), 3600).call();
+        CoordinatorActionBean action = CoordActionQueryExecutor.getInstance()
+                .get(CoordActionQuery.GET_COORD_ACTION, job.getId() + "@1");
+        assertEquals(CoordCommandUtils.RESOLVED_UNRESOLVED_SEPARATOR + "${coord:latestRange(-3,0)}",
+                action.getMissingDependencies());
+        long timeOutCreationTime = System.currentTimeMillis() - (13 * 60 * 1000);
+        setCoordActionCreationTime(action.getId(), timeOutCreationTime);
+        new CoordActionInputCheckXCommand(action.getId(), action.getJobId()).call();
+        checkCoordActionStatus(action.getId(),  CoordinatorAction.Status.TIMEDOUT);
+    }
+
+    @Test
     public void testTimeoutWithException() throws Exception {
         String missingDeps = "nofs:///dirx/filex";
         String actionId = addInitRecords(missingDeps, null, TZ);

http://git-wip-us.apache.org/repos/asf/oozie/blob/0a6f83e6/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 3358149..f126e64 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 5.0.0 release (trunk - unreleased)
 
+OOZIE-3031 Coord job with only unresolved dependencies doesn't timeout (puru via satishsaley)
 OOZIE-3079 Filtering coordinators returns bundle id as null (satishsaley)
 OOZIE-3078 PasswordMasker throws NPE with null arguments (asasvari)
 OOZIE-3075 Follow-up on OOZIE-3054: create the lib directory if it doesn't exist (pbacsko)