incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgog...@apache.org
Subject svn commit: r1176004 - /incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Node.java
Date Mon, 26 Sep 2011 19:14:11 GMT
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



Mime
View raw message