Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-122

Make explicit call to Cluster.updateClusterState() when state of cluster changes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 0.1.0
    • 0.1.0
    • ambari-server
    • None

    Description

      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);

      Attachments

        Activity

          People

            ddas Devaraj Das
            vitthal_gogate vitthal (Suhas) Gogate
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: