Author: ncole
Date: Wed Apr 24 16:35:43 2013
New Revision: 1471517
URL: http://svn.apache.org/r1471517
Log:
AMBARI-2013. Fix to delete cluster with components in unknown state
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1471517&r1=1471516&r2=1471517&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed Apr 24 16:35:43 2013
@@ -1258,6 +1258,8 @@ Trunk (unreleased changes):
AMBARI-1657. User directories on HDFS do not get created with custom names
provided from Ambari UI. (swagle)
+ AMBARI-2013. Fix to delete cluster with components in unknown state. (ncole)
+
AMBARI-1977. Honor service configs when there are no matching cluster configs
(ncole)
AMBARI-1976. When host expires, update each component for host with unknown
state. (ncole)
Modified:
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/state/State.java?rev=1471517&r1=1471516&r2=1471517&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
(original)
+++
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
Wed Apr 24 16:35:43 2013
@@ -143,6 +143,7 @@ public enum State {
case INSTALLED:
case INSTALL_FAILED:
case UNINSTALLED:
+ case UNKNOWN:
case MAINTENANCE:
return true;
default:
Modified:
incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java?rev=1471517&r1=1471516&r2=1471517&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
(original)
+++
incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
Wed Apr 24 16:35:43 2013
@@ -55,6 +55,7 @@ import org.apache.ambari.server.state.Se
import org.apache.ambari.server.state.ServiceComponent;
import org.apache.ambari.server.state.ServiceComponentHost;
import org.apache.ambari.server.state.StackId;
+import org.apache.ambari.server.state.State;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -356,12 +357,19 @@ public class ClustersTest {
nameNode.persist();
ServiceComponent dataNode = hdfs.addServiceComponent("DATANODE");
dataNode.persist();
+
+ ServiceComponent serviceCheckNode =
hdfs.addServiceComponent("HDFS_CLIENT");
+ serviceCheckNode.persist();
ServiceComponentHost nameNodeHost = nameNode.addServiceComponentHost(h1);
nameNodeHost.persist();
ServiceComponentHost dataNodeHost = dataNode.addServiceComponentHost(h2);
dataNodeHost.persist();
+
+ ServiceComponentHost serviceCheckNodeHost =
serviceCheckNode.addServiceComponentHost(h2);
+ serviceCheckNodeHost.persist();
+ serviceCheckNodeHost.setState(State.UNKNOWN);
HostComponentStateEntityPK hkspk = new HostComponentStateEntityPK();
HostComponentDesiredStateEntityPK hkdspk = new
HostComponentDesiredStateEntityPK();