[ 
https://issues.apache.org/jira/browse/AMBARI-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142707#comment-13142707
 ] 

vitthal (Suhas) Gogate commented on AMBARI-122:
-----------------------------------------------

We can discuss and fix it, if used in state machine. 
                
> Make explicit call to Cluster.updateClusterState() when state of cluster 
> changes
> --------------------------------------------------------------------------------
>
>                 Key: AMBARI-122
>                 URL: https://issues.apache.org/jira/browse/AMBARI-122
>             Project: Ambari
>          Issue Type: Bug
>          Components: controller
>    Affects Versions: 0.1.0
>            Reporter: vitthal (Suhas) Gogate
>            Assignee: Devaraj Das
>             Fix For: 0.1.0
>
>
> Previously Cluster.getClusterState() was returning the reference to 
> ClusterState object and changing any elements of this state object would 
> change the cluster state. Now as we have to persist the state, we have to 
> explicitly make a call to Cluster.updateCluterState() when cluster state 
> changes... 
> Following scenario will NOT update cluster state 
> Cluster cls = getClusterByName(clusterName);
> cls.getClusterState().setState("ATTIC"); 
> Instead, 
> Cluster cls = getClusterByName(clusterName);
> ClusterState cs = cls.getClusterState();
> cs.setState("ATTIC");
> cls.updateClusterState(cs);

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to