incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r1179725 - in /incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine: ClusterFSM.java ClusterImpl.java ServiceImpl.java
Date Thu, 06 Oct 2011 18:00:30 GMT
Author: ddas
Date: Thu Oct  6 18:00:29 2011
New Revision: 1179725

URL: http://svn.apache.org/viewvc?rev=1179725&view=rev
Log:
AMBARI-45. Rename the getState to getClusterState in ClusterFSM. Contributed by Devaraj Das.

Modified:
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ClusterFSM.java
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ClusterImpl.java
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ServiceImpl.java

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ClusterFSM.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ClusterFSM.java?rev=1179725&r1=1179724&r2=1179725&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ClusterFSM.java
(original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ClusterFSM.java
Thu Oct  6 18:00:29 2011
@@ -20,10 +20,12 @@ package org.apache.ambari.resource.state
 import java.util.List;
 import java.util.Map;
 
+import org.apache.ambari.common.rest.entities.ClusterState;
+
 public interface ClusterFSM extends LifeCycle {
   public List<ServiceFSM> getServices();
-  public ClusterStateFSM getState();
   public Map<String, String> getServiceStates();
   public String getClusterID();
   public void terminate();
+  public ClusterState getClusterState();
 }

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ClusterImpl.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ClusterImpl.java?rev=1179725&r1=1179724&r2=1179725&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ClusterImpl.java
(original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ClusterImpl.java
Thu Oct  6 18:00:29 2011
@@ -113,7 +113,6 @@ public class ClusterImpl implements Clus
     this.services = serviceImpls;
   }
   
-  @Override
   public ClusterStateFSM getState() {
     return stateMachine.getCurrentState();
   }
@@ -148,7 +147,8 @@ public class ClusterImpl implements Clus
     return null;
   }
   
-  private ClusterState getClusterState() {
+  @Override
+  public ClusterState getClusterState() {
     return cluster.getClusterState();
   }
   

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ServiceImpl.java?rev=1179725&r1=1179724&r2=1179725&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ServiceImpl.java
(original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/resource/statemachine/ServiceImpl.java
Thu Oct  6 18:00:29 2011
@@ -209,7 +209,7 @@ public class ServiceImpl implements Serv
             RoleEventType.STOP, role));
         return ServiceState.STOPPING;
       } else {
-        if (operand.getAssociatedCluster().getState() 
+        if (((ClusterImpl)operand.getAssociatedCluster()).getState() 
             == ClusterStateFSM.STOPPING) {
           //since we support stopping services explicitly (without stopping the 
           //associated cluster), we need to check what the cluster state is



Mime
View raw message