This is an automated email from the ASF dual-hosted git repository.

rohini pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/oozie.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e61deb  OOZIE-3527 Oozie stuck in waiting state if 
CoordPushDependencyCheckXCommand is not requeued (mgogineni via rohini)
4e61deb is described below

commit 4e61deb7598ec1ed32b5839e2a1ba978485b2cc8
Author: Rohini Palaniswamy <[email protected]>
AuthorDate: Tue Jul 16 15:31:37 2019 -0700

    OOZIE-3527 Oozie stuck in waiting state if CoordPushDependencyCheckXCommand 
is not requeued (mgogineni via rohini)
---
 .../oozie/command/coord/CoordActionInputCheckXCommand.java       | 9 +++++++--
 .../oozie/command/coord/CoordPushDependencyCheckXCommand.java    | 2 ++
 .../oozie/executor/jpa/CoordActionGetForCheckJPAExecutor.java    | 4 ++++
 release-log.txt                                                  | 1 +
 4 files changed, 14 insertions(+), 2 deletions(-)

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 66875f1..b19dd50 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
@@ -501,8 +501,13 @@ public class CoordActionInputCheckXCommand extends 
CoordinatorXCommand<Void> {
         }
         try {
             coordAction = jpaService.execute(new 
CoordActionGetForInputCheckJPAExecutor(actionId));
-            coordJob = 
CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB_INPUT_CHECK,
-                    coordAction.getJobId());
+            if (coordAction != null){
+                coordJob = 
CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB_INPUT_CHECK,
+                        coordAction.getJobId());
+            }
+            else {
+                throw new CommandException(ErrorCode.E0605, actionId);
+            }
         }
         catch (JPAExecutorException je) {
             throw new CommandException(je);
diff --git 
a/core/src/main/java/org/apache/oozie/command/coord/CoordPushDependencyCheckXCommand.java
 
b/core/src/main/java/org/apache/oozie/command/coord/CoordPushDependencyCheckXCommand.java
index d7a143a..223c152 100644
--- 
a/core/src/main/java/org/apache/oozie/command/coord/CoordPushDependencyCheckXCommand.java
+++ 
b/core/src/main/java/org/apache/oozie/command/coord/CoordPushDependencyCheckXCommand.java
@@ -388,6 +388,8 @@ public class CoordPushDependencyCheckXCommand extends 
CoordinatorXCommand<Void>
             }
         }
         catch (JPAExecutorException je) {
+            final CallableQueueService callableQueueService = 
Services.get().get(CallableQueueService.class);
+            callableQueueService.queue(new 
CoordPushDependencyCheckXCommand(actionId), getCoordPushCheckRequeueInterval());
             throw new CommandException(je);
         }
     }
diff --git 
a/core/src/main/java/org/apache/oozie/executor/jpa/CoordActionGetForCheckJPAExecutor.java
 
b/core/src/main/java/org/apache/oozie/executor/jpa/CoordActionGetForCheckJPAExecutor.java
index 4ebe333..a84e6b6 100644
--- 
a/core/src/main/java/org/apache/oozie/executor/jpa/CoordActionGetForCheckJPAExecutor.java
+++ 
b/core/src/main/java/org/apache/oozie/executor/jpa/CoordActionGetForCheckJPAExecutor.java
@@ -23,6 +23,7 @@ import java.util.List;
 import java.util.Objects;
 
 import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
 import javax.persistence.Query;
 
 import org.apache.oozie.CoordinatorActionBean;
@@ -56,6 +57,9 @@ public class CoordActionGetForCheckJPAExecutor implements 
JPAExecutor<Coordinato
             CoordinatorActionBean caBean = getBeanForRunningCoordAction(obj);
             return caBean;
         }
+        catch (NoResultException e) {
+            return null;
+        }
         catch (Exception e) {
             throw new JPAExecutorException(ErrorCode.E0603, e.getMessage(), e);
         }
diff --git a/release-log.txt b/release-log.txt
index a1de03e..8e0a18a 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 5.2.0 release (trunk - unreleased)
 
+OOZIE-3527 Oozie stuck in waiting state if CoordPushDependencyCheckXCommand is 
not requeued (mgogineni via rohini)
 OOZIE-3524 fs:fileSize() does not work correctly for files with extra slash in 
path (mgogineni via asalamon74)
 OOZIE-3523 First missing dependency is shown incorrectly (mgogineni via 
asalamon74)
 OOZIE-2836 Remove .ps1 and .cmd windows scripts (kmarton via asalamon74)

Reply via email to