Author: mona
Date: Tue Aug 27 19:57:49 2013
New Revision: 1517961

URL: http://svn.apache.org/r1517961
Log:
OOZIE-1514 Rerunning a coordinator with no input dependencies puts actions in 
WAITING instead of READY and proceeding (bowenzhangusa via mona)

Modified:
    
oozie/trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
    
oozie/trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java
    oozie/trunk/release-log.txt

Modified: 
oozie/trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
URL: 
http://svn.apache.org/viewvc/oozie/trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java?rev=1517961&r1=1517960&r2=1517961&view=diff
==============================================================================
--- 
oozie/trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
 (original)
+++ 
oozie/trunk/core/src/main/java/org/apache/oozie/command/coord/CoordActionInputCheckXCommand.java
 Tue Aug 27 19:57:49 2013
@@ -141,8 +141,8 @@ public class CoordActionInputCheckXComma
                 
nonExistList.append(CoordCommandUtils.RESOLVED_UNRESOLVED_SEPARATOR).append(nonResolvedList);
             }
             String nonExistListStr = nonExistList.toString();
-            if (!nonExistListStr.equals(missingDeps)) {
-                // missingDeps null means action should become READY
+            if (!nonExistListStr.equals(missingDeps) || missingDeps.isEmpty()) 
{
+                // missingDeps null or empty means action should become READY
                 isChangeInDependency = true;
                 coordAction.setMissingDependencies(nonExistListStr);
             }

Modified: 
oozie/trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java
URL: 
http://svn.apache.org/viewvc/oozie/trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java?rev=1517961&r1=1517960&r2=1517961&view=diff
==============================================================================
--- 
oozie/trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java
 (original)
+++ 
oozie/trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordActionInputCheckXCommand.java
 Tue Aug 27 19:57:49 2013
@@ -695,6 +695,26 @@ public class TestCoordActionInputCheckXC
             fail("Action ID " + coordJob.getId() + "@1" + " was not stored 
properly in db");
         }
         assertEquals(action.getStatus(), CoordinatorAction.Status.READY);
+
+        action.setMissingDependencies("");
+        action.setStatus(CoordinatorAction.Status.WAITING);
+        try {
+            jpaService = Services.get().get(JPAService.class);
+            jpaService.execute(new 
CoordActionUpdateForInputCheckJPAExecutor(action));
+        }
+        catch (JPAExecutorException se) {
+            fail("Action ID " + coordJob.getId() + "@1" + " was not stored 
properly in db");
+        }
+
+        new CoordActionInputCheckXCommand(coordJob.getId() + "@1", 
coordJob.getId()).call();
+        try {
+            jpaService = Services.get().get(JPAService.class);
+            action = jpaService.execute(new 
CoordActionGetJPAExecutor(coordJob.getId() + "@1"));
+        }
+        catch (JPAExecutorException se) {
+            fail("Action ID " + coordJob.getId() + "@1" + " was not stored 
properly in db");
+        }
+        assertEquals(action.getStatus(), CoordinatorAction.Status.READY);
     }
 
     @Test

Modified: oozie/trunk/release-log.txt
URL: 
http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1517961&r1=1517960&r2=1517961&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Tue Aug 27 19:57:49 2013
@@ -16,6 +16,7 @@ OOZIE-1440 Build fails in certain enviro
 
 -- Oozie 4.0.0 release
 
+OOZIE-1514 Rerunning a coordinator with no input dependencies puts actions in 
WAITING instead of READY and proceeding (bowenzhangusa via mona)
 OOZIE-1507 Command queue filling up with duplicate commands from 
RecoveryService (rohini)
 OOZIE-1502 Coordinator Job not going to Failed if a bad HCat-uri is specified 
(mona)
 OOZIE-1501 Mapreduce action counters are picked up from launcher job instead 
of mapreduce job (rohini)


Reply via email to