You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by vi...@apache.org on 2012/07/18 04:39:05 UTC
svn commit: r1362748 - in /incubator/oozie/trunk:
core/src/main/java/org/apache/oozie/BundleActionBean.java
core/src/main/java/org/apache/oozie/command/bundle/BundleStatusUpdateXCommand.java
release-log.txt
Author: virag
Date: Wed Jul 18 02:39:04 2012
New Revision: 1362748
URL: http://svn.apache.org/viewvc?rev=1362748&view=rev
Log:
OOZIE-904 TestBundleStartX Failing (virag)
Modified:
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/BundleActionBean.java
incubator/oozie/trunk/core/src/main/java/org/apache/oozie/command/bundle/BundleStatusUpdateXCommand.java
incubator/oozie/trunk/release-log.txt
Modified: incubator/oozie/trunk/core/src/main/java/org/apache/oozie/BundleActionBean.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/BundleActionBean.java?rev=1362748&r1=1362747&r2=1362748&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/main/java/org/apache/oozie/BundleActionBean.java (original)
+++ incubator/oozie/trunk/core/src/main/java/org/apache/oozie/BundleActionBean.java Wed Jul 18 02:39:04 2012
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -276,6 +276,25 @@ public class BundleActionBean implements
}
/**
+ * @return true if in terminal status
+ */
+ public boolean isTerminalStatus() {
+ boolean isTerminal = false;
+ switch (getStatus()) {
+ case SUCCEEDED:
+ case FAILED:
+ case KILLED:
+ case DONEWITHERROR:
+ isTerminal = true;
+ break;
+ default:
+ isTerminal = false;
+ break;
+ }
+ return isTerminal;
+ }
+
+ /**
* Set Last modified time.
*
* @param lastModifiedTimestamp the lastModifiedTimestamp to set
Modified: incubator/oozie/trunk/core/src/main/java/org/apache/oozie/command/bundle/BundleStatusUpdateXCommand.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/command/bundle/BundleStatusUpdateXCommand.java?rev=1362748&r1=1362747&r2=1362748&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/main/java/org/apache/oozie/command/bundle/BundleStatusUpdateXCommand.java (original)
+++ incubator/oozie/trunk/core/src/main/java/org/apache/oozie/command/bundle/BundleStatusUpdateXCommand.java Wed Jul 18 02:39:04 2012
@@ -64,11 +64,9 @@ public class BundleStatusUpdateXCommand
LOG.debug("STARTED BundleStatusUpdateXCommand with bundle id : " + coordjob.getBundleId()
+ " coord job ID: " + coordjob.getId() + " coord Status " + coordjob.getStatus());
Job.Status coordCurrentStatus = coordjob.getStatus();
- Job.Status bundleActionStatus = bundleaction.getStatus();
- // The status of bundle action should not be updated if it doesn't have a coord-id
- // For e.g, if bundle action is killed and coord-job is in prep, then the bundle status
- // should not be updated
- if (bundleaction.getCoordId() != null) {
+ // The status of bundle action should not be updated if the bundle action is in terminal state
+ // TODO - change this once bottom up rerun is allowed to change the bundle action state
+ if (!bundleaction.isTerminalStatus()) {
bundleaction.setStatus(coordCurrentStatus);
}
if (bundleaction.isPending()) {
@@ -79,11 +77,11 @@ public class BundleStatusUpdateXCommand
jpaService.execute(new BundleActionUpdateJPAExecutor(bundleaction));
if (bundleaction.getCoordId() != null) {
LOG.info("Updated bundle action [{0}] from prev status [{1}] to current coord status [{2}], and new bundle action pending [{3}]", bundleaction
- .getBundleActionId(), bundleActionStatus, coordCurrentStatus, bundleaction.getPending());
+ .getBundleActionId(), bundleaction.getStatus(), coordCurrentStatus, bundleaction.getPending());
}
else {
LOG.info("Updated Bundle action [{0}], status = [{1}], pending = [{2}]", bundleaction.getBundleActionId(),
- bundleActionStatus, bundleaction.getPending());
+ bundleaction.getStatus(), bundleaction.getPending());
}
LOG.debug("ENDED BundleStatusUpdateXCommand with bundle id : " + coordjob.getBundleId() + " coord job ID: "
+ coordjob.getId() + " coord Status " + coordjob.getStatus());
Modified: incubator/oozie/trunk/release-log.txt
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/release-log.txt?rev=1362748&r1=1362747&r2=1362748&view=diff
==============================================================================
--- incubator/oozie/trunk/release-log.txt (original)
+++ incubator/oozie/trunk/release-log.txt Wed Jul 18 02:39:04 2012
@@ -1,5 +1,6 @@
-- Oozie 3.3.0 release (trunk - unreleased)
+OOZIE-904 TestBundleStartX Failing (virag)
OOZIE-907 Default ACL settings for Oozie launcher (mona via virag)
OOZIE-908 Oozie docs build instructions for hadoop versions (mona via virag)
OOZIE-874 Eliminate redundancies in xml (britt via virag)