Repository: oozie Updated Branches: refs/heads/master f6b3f0e8c -> 1e0ed571f
OOZIE-1792 Ability to kill bundle stuck in RUNNING due to inconsistent pending states (rohini) Project: http://git-wip-us.apache.org/repos/asf/oozie/repo Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/1e0ed571 Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/1e0ed571 Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/1e0ed571 Branch: refs/heads/master Commit: 1e0ed571f72348fb47b96dd93f6f35c1a09dcb3f Parents: f6b3f0e Author: Rohini Palaniswamy <[email protected]> Authored: Tue Apr 15 10:48:08 2014 -0700 Committer: Rohini Palaniswamy <[email protected]> Committed: Tue Apr 15 10:48:08 2014 -0700 ---------------------------------------------------------------------- .../command/bundle/BundleKillXCommand.java | 25 ++++++++++++-------- release-log.txt | 1 + 2 files changed, 16 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oozie/blob/1e0ed571/core/src/main/java/org/apache/oozie/command/bundle/BundleKillXCommand.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/oozie/command/bundle/BundleKillXCommand.java b/core/src/main/java/org/apache/oozie/command/bundle/BundleKillXCommand.java index cc0d9d5..3ab3273 100644 --- a/core/src/main/java/org/apache/oozie/command/bundle/BundleKillXCommand.java +++ b/core/src/main/java/org/apache/oozie/command/bundle/BundleKillXCommand.java @@ -129,17 +129,22 @@ public class BundleKillXCommand extends KillTransitionXCommand { else { // Due to race condition bundle action pending might be true // while coordinator is killed. - if (action.isPending() && action.getCoordId() != null) { - try { - CoordinatorJobBean coordJob = CoordJobQueryExecutor.getInstance().get(CoordJobQuery.GET_COORD_JOB, - action.getCoordId()); - if (!coordJob.isPending() && coordJob.isTerminalStatus()) { - action.decrementAndGetPending(); - action.setStatus(coordJob.getStatus()); - } + if (action.isPending()) { + if (action.getCoordId() == null) { + action.setPending(0); } - catch (JPAExecutorException e) { - LOG.warn("Error in checking coord job status:" + action.getCoordId(), e); + else { + try { + CoordinatorJobBean coordJob = CoordJobQueryExecutor.getInstance().get( + CoordJobQuery.GET_COORD_JOB, action.getCoordId()); + if (!coordJob.isPending() && coordJob.isTerminalStatus()) { + action.setPending(0); + action.setStatus(coordJob.getStatus()); + } + } + catch (JPAExecutorException e) { + LOG.warn("Error in checking coord job status:" + action.getCoordId(), e); + } } } } http://git-wip-us.apache.org/repos/asf/oozie/blob/1e0ed571/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index 413932b..ecc4441 100644 --- a/release-log.txt +++ b/release-log.txt @@ -1,5 +1,6 @@ -- Oozie 4.1.0 release (trunk - unreleased) +OOZIE-1792 Ability to kill bundle stuck in RUNNING due to inconsistent pending states (rohini) OOZIE-1703 User should be able to set coord end-time before start time (puru via rohini) OOZIE-1719 v1/jobs api returns null for parentId even when it exists (ryota) OOZIE-1773 bulk API returns total = 0 when it's not (ryota)
