You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vg...@apache.org on 2011/09/26 21:14:11 UTC

svn commit: r1176004 - /incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Node.java

Author: vgogate
Date: Mon Sep 26 19:14:11 2011
New Revision: 1176004

URL: http://svn.apache.org/viewvc?rev=1176004&view=rev
Log:
AMBARI-6

Modified:
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Node.java

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Node.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Node.java?rev=1176004&r1=1176003&r2=1176004&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Node.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Node.java Mon Sep 26 19:14:11 2011
@@ -50,27 +50,29 @@ public class Node {
    
         public Node () {}
 
-        public Node (String name) {
-                this.name = name;
-        }
-        
-        /*
-         * 
-         */
-        public void releaseNodeFromCluster() {
-                this.nodeState.setClusterName(null);
-                this.getNodeState().setNodeServers(null);
-        }
-        
-        /*
-         * Reserving node for cluster is done by associating cluster name w/ node
-         */
-        public void reserveNodeForCluster (String clusterName, Boolean agentInstalled) {
-                this.getNodeState().setClusterName(clusterName);
-                this.getNodeState().setAgentInstalled(agentInstalled);
-        }
-        
-
+	public Node (String name) {
+		this.name = name;
+	}
+	
+	/*
+	 * 
+	 */
+	public void releaseNodeFromCluster() {
+		this.nodeState.setClusterName(null);
+		this.getNodeState().setNodeServers(null);
+		/*
+		 * TODO: AllocatedToClsuter flag will be reset part of heart beat processing when node completes cleanup.
+		 */
+	}
+	
+	/*
+	 * Reserving node for cluster is done by associating cluster name w/ node
+	 */
+	public void reserveNodeForCluster (String clusterName, Boolean agentInstalled) {
+		this.getNodeState().setClusterName(clusterName);
+		this.getNodeState().setAgentInstalled(agentInstalled);
+		this.getNodeState().setAllocatedToCluster(true);
+	}
         
     /**
          * @return the name