You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rn...@apache.org on 2014/12/29 02:58:33 UTC
ambari git commit: AMBARI-8934. Fix event handling for Hive
deployments in Blueprints. (rnettleton)
Repository: ambari
Updated Branches:
refs/heads/trunk a66df3853 -> 9c73f2cbb
AMBARI-8934. Fix event handling for Hive deployments in Blueprints. (rnettleton)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9c73f2cb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9c73f2cb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9c73f2cb
Branch: refs/heads/trunk
Commit: 9c73f2cbba3e0d0cb6a6f9e8e94ef6c830afcbf4
Parents: a66df38
Author: Bob Nettleton <rn...@hortonworks.com>
Authored: Sun Dec 28 20:57:32 2014 -0500
Committer: Bob Nettleton <rn...@hortonworks.com>
Committed: Sun Dec 28 20:57:32 2014 -0500
----------------------------------------------------------------------
.../apache/ambari/server/state/cluster/ClusterImpl.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/9c73f2cb/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
index f80044e..70a2bba 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
@@ -98,6 +98,7 @@ import org.apache.ambari.server.state.Service;
import org.apache.ambari.server.state.ServiceComponent;
import org.apache.ambari.server.state.ServiceComponentHost;
import org.apache.ambari.server.state.ServiceComponentHostEvent;
+import org.apache.ambari.server.state.ServiceComponentHostEventType;
import org.apache.ambari.server.state.ServiceFactory;
import org.apache.ambari.server.state.ServiceInfo;
import org.apache.ambari.server.state.StackId;
@@ -2328,7 +2329,15 @@ public class ClusterImpl implements Cluster {
failedEvents.add(event);
} catch (InvalidStateTransitionException e) {
LOG.error("Invalid transition ", e);
- failedEvents.add(event);
+ if ((e.getEvent() == ServiceComponentHostEventType.HOST_SVCCOMP_START) &&
+ (e.getCurrentState() == State.STARTED)) {
+ LOG.warn("Component request for component = " + event.getServiceComponentName() + " to start is invalid, since component is already started. Ignoring this request.");
+ // skip adding this as a failed event, to work around stack ordering issues with Hive
+ } else {
+ failedEvents.add(event);
+ }
+
+
}
}
} finally {