incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgog...@apache.org
Subject svn commit: r1178279 - in /incubator/ambari/trunk: ./ client/src/main/java/org/apache/ambari/common/rest/entities/ controller/src/main/java/org/apache/ambari/controller/
Date Sun, 02 Oct 2011 23:38:07 GMT
Author: vgogate
Date: Sun Oct  2 23:38:06 2011
New Revision: 1178279

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

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Blueprint.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/ClusterDefinition.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Component.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/ConfigPropertiesCategory.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Node.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeServer.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/PackageRepository.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Role.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/RoleToNodesMap.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/RoleToNodesMapEntry.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Roles.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Stack.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/User.java
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Blueprints.java
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Stacks.java

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Sun Oct  2 23:38:06 2011
@@ -2,6 +2,8 @@ Ambari Change log
 
 Release 0.1.0 - unreleased
 
+  AMBARI-31. Fix JAXB annotations for Ambari resourcesi (vgogate)
+
   AMBARI-30. Fix the build so that the client and controller tarballs are 
   built. (omalley)
 

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Blueprint.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Blueprint.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Blueprint.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Blueprint.java
Sun Oct  2 23:38:06 2011
@@ -42,7 +42,7 @@ import javax.xml.bind.annotation.XmlType
     "components",
     "roles"
 })
-@XmlRootElement(name = "Blueprint")
+@XmlRootElement(name = "Blueprints")
 public class Blueprint {
 
     @XmlElement(name = "Name", required = true)

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/ClusterDefinition.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/ClusterDefinition.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/ClusterDefinition.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/ClusterDefinition.java
Sun Oct  2 23:38:06 2011
@@ -42,7 +42,7 @@ import javax.xml.bind.annotation.XmlType
     "nodeRangeExpressions",
     "roleToNodesMap"
 })
-@XmlRootElement(name = "ClusterDefinition")
+@XmlRootElement(name = "ClusterDefinitions")
 public class ClusterDefinition {
         
     public static final String GOAL_STATE_ACTIVE = "ACTIVE";

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Component.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Component.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Component.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Component.java
Sun Oct  2 23:38:06 2011
@@ -22,6 +22,7 @@ import java.util.List;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
 
@@ -34,11 +35,12 @@ import javax.xml.bind.annotation.XmlType
     "name",
     "property"
 })
+@XmlRootElement(name = "Components")
 public class Component {
 
     @XmlElement(name = "Name", required = true)
     protected String name;
-    @XmlElement(name = "Property", required = true)
+    @XmlElement(name = "Properties", required = true)
     protected List<Property> property;
 
     /**

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/ConfigPropertiesCategory.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/ConfigPropertiesCategory.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/ConfigPropertiesCategory.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/ConfigPropertiesCategory.java
Sun Oct  2 23:38:06 2011
@@ -35,12 +35,12 @@ import javax.xml.bind.annotation.XmlType
     "name",
     "property"
 })
-@XmlRootElement(name = "ConfigPropertiesCategory")
+@XmlRootElement(name = "ConfigPropertyCategories")
 public class ConfigPropertiesCategory {
 
     @XmlElement(name = "Name", required = true)
     protected String name;
-    @XmlElement(name = "Property", required = true)
+    @XmlElement(name = "Properties", required = true)
     protected List<Property> property;
 
     /**

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=1178279&r1=1178278&r2=1178279&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
Sun Oct  2 23:38:06 2011
@@ -35,7 +35,7 @@ import javax.xml.bind.annotation.XmlType
     "nodeAttributes",
     "nodeState"
 })
-@XmlRootElement(name = "Node")
+@XmlRootElement(name = "Nodes")
 public class Node {
     
     @XmlElement(name = "Name", required = true)

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeServer.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeServer.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeServer.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeServer.java
Sun Oct  2 23:38:06 2011
@@ -38,77 +38,76 @@ import javax.xml.datatype.XMLGregorianCa
 })
 public class NodeServer {
 
-        public static final String NODE_SERVER_STATE_UP = "UP";
-        public static final String NODE_SERVER_STATE_DOWN = "DOWN";
-        
-        /*
-         * name should be component name : role name
-         * TODO : May be we can have component and role as two separate attributes instead
of name
-         */
-        @XmlElement(name = "Name", required = true)
-        protected String name;
-        
-        @XmlElement(name = "State", required = true)
-        protected String state;  // UP/DOWN
-        
-        @XmlElement(name = "LastStateUpdateTime", required = true)
+    public static final String NODE_SERVER_STATE_UP = "UP";
+    public static final String NODE_SERVER_STATE_DOWN = "DOWN";
+    
+    /*
+     * name should be component name : role name
+     * TODO : May be we can have component and role as two separate attributes instead of
name
+     */
+    @XmlElement(name = "Name", required = true)
+    protected String name;
+    
+    @XmlElement(name = "State", required = true)
+    protected String state;  // UP/DOWN
+    
+    @XmlElement(name = "LastStateUpdateTime", required = true)
     @XmlSchemaType(name = "dateTime")
     protected XMLGregorianCalendar lastStateUpdateTime;
         
-        /**
-         * 
-         */
-        
-        /**
-         * @return the name
-         */
-        public String getName() {
-                return name;
-        }
-
-        /**
-         * @param name the name to set
-         */
-        public void setName(String name) {
-                this.name = name;
-        }
-
-        /**
-         * @return the state
-         */
-        public String getState() {
-                return state;
-        }
-
-        /**
-         * @param state the state to set
-         */
-        public void setState(String state) {
-                this.state = state;
-        }
-
-
-        /**
-         * @return the lastStateUpdateTime
-         */
-        public XMLGregorianCalendar getLastStateUpdateTime() {
-                return lastStateUpdateTime;
-        }
-
-        /**
-         * @param lastStateUpdateTime the lastStateUpdateTime to set
-         */
-        public void setLastStateUpdateTime(XMLGregorianCalendar lastStateUpdateTime) {
-                this.lastStateUpdateTime = lastStateUpdateTime;
-        }
-
-        /**
-         * @param creationTime the creationTime to set
-         */
-        protected void setLastUpdateTime(Date lastStateUpdateTime) throws Exception {
-                GregorianCalendar cal = new GregorianCalendar();
-                cal.setTime(lastStateUpdateTime);
-                this.lastStateUpdateTime = DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
-        }
-
+    /**
+     * 
+     */
+    
+    /**
+     * @return the name
+     */
+    public String getName() {
+            return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name) {
+            this.name = name;
+    }
+
+    /**
+     * @return the state
+     */
+    public String getState() {
+            return state;
+    }
+
+    /**
+     * @param state the state to set
+     */
+    public void setState(String state) {
+            this.state = state;
+    }
+
+
+    /**
+     * @return the lastStateUpdateTime
+     */
+    public XMLGregorianCalendar getLastStateUpdateTime() {
+            return lastStateUpdateTime;
+    }
+
+    /**
+     * @param lastStateUpdateTime the lastStateUpdateTime to set
+     */
+    public void setLastStateUpdateTime(XMLGregorianCalendar lastStateUpdateTime) {
+            this.lastStateUpdateTime = lastStateUpdateTime;
+    }
+
+    /**
+     * @param creationTime the creationTime to set
+     */
+    protected void setLastUpdateTime(Date lastStateUpdateTime) throws Exception {
+            GregorianCalendar cal = new GregorianCalendar();
+            cal.setTime(lastStateUpdateTime);
+            this.lastStateUpdateTime = DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
+    }
 }

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/PackageRepository.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/PackageRepository.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/PackageRepository.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/PackageRepository.java
Sun Oct  2 23:38:06 2011
@@ -20,6 +20,7 @@ package org.apache.ambari.common.rest.en
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
 
@@ -48,6 +49,7 @@ import javax.xml.bind.annotation.XmlType
     "locationURL",
     "type"
 })
+@XmlRootElement(name = "PackageRepository")
 public class PackageRepository {
 
     @XmlElement(name = "LocationURL", required = true)

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Role.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Role.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Role.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Role.java
Sun Oct  2 23:38:06 2011
@@ -20,6 +20,7 @@ package org.apache.ambari.common.rest.en
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
 
@@ -28,6 +29,7 @@ import javax.xml.bind.annotation.XmlType
     "name",
     "configuration"
 })
+@XmlRootElement(name = "Roles")
 public class Role {
 
     @XmlElement(name = "Name", required = true)

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/RoleToNodesMap.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/RoleToNodesMap.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/RoleToNodesMap.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/RoleToNodesMap.java
Sun Oct  2 23:38:06 2011
@@ -22,6 +22,7 @@ import java.util.List;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
 
@@ -48,6 +49,7 @@ import javax.xml.bind.annotation.XmlType
 @XmlType(name = "RoleToNodesMap", propOrder = {
     "roleToNodesMapEntry"
 })
+@XmlRootElement(name = "RoleToNodesMap")
 public class RoleToNodesMap {
 
     @XmlElement(name = "RoleToNodesMapEntries", required = true)

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/RoleToNodesMapEntry.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/RoleToNodesMapEntry.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/RoleToNodesMapEntry.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/RoleToNodesMapEntry.java
Sun Oct  2 23:38:06 2011
@@ -56,7 +56,7 @@ public class RoleToNodesMapEntry {
 
     @XmlElement(name = "RoleName", required = true)
     protected String roleName;
-    @XmlElement(name = "Nodes", required = true)
+    @XmlElement(name = "NodeRangeExpressions", required = true)
     protected List<String> nodeRangeExpressions;
     
         /**

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Roles.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Roles.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Roles.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Roles.java
Sun Oct  2 23:38:06 2011
@@ -22,6 +22,7 @@ import java.util.List;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
 
@@ -48,9 +49,10 @@ import javax.xml.bind.annotation.XmlType
 @XmlType(name = "RolesType", propOrder = {
     "role"
 })
+@XmlRootElement(name = "Roles")
 public class Roles {
 
-    @XmlElement(name = "Role", required = true)
+    @XmlElement(name = "Roles", required = true)
     protected List<Role> role;
 
     /**

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Stack.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Stack.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Stack.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Stack.java
Sun Oct  2 23:38:06 2011
@@ -34,7 +34,7 @@ import javax.xml.bind.annotation.XmlType
     "blueprintLocationURL",
     "stackRevision"
 })
-@XmlRootElement(name = "Stack")
+@XmlRootElement(name = "Stacks")
 public class Stack {
     
     @XmlElement(name = "Name", required = true)

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/User.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/User.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/User.java
(original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/User.java
Sun Oct  2 23:38:06 2011
@@ -44,7 +44,7 @@ import javax.xml.bind.annotation.XmlType
  * 
  */
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "UserType", propOrder = {
+@XmlType(name = "User", propOrder = {
     "name",
     "group"
 })

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Blueprints.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Blueprints.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Blueprints.java
(original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Blueprints.java
Sun Oct  2 23:38:06 2011
@@ -110,6 +110,10 @@ public class Blueprints {
         slaves_role.setName("slaves");
         slaves_role.setConfiguration(bpDefaultCfg);
         
+        roleList.add(hdfs_nn_role);
+        roleList.add(mapred_jt_role);
+        roleList.add(slaves_role);
+        
         bp.setRoles(roleList);
         
         ConcurrentHashMap<Integer, Blueprint> x = new ConcurrentHashMap<Integer,
Blueprint>();

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Stacks.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Stacks.java?rev=1178279&r1=1178278&r2=1178279&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Stacks.java
(original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Stacks.java
Sun Oct  2 23:38:06 2011
@@ -133,6 +133,10 @@ public class Stacks {
         slaves_role.setName("slaves");
         slaves_role.setConfiguration(bpDefaultCfg);
         
+        roleList.add(hdfs_nn_role);
+        roleList.add(mapred_jt_role);
+        roleList.add(slaves_role);
+        
         bp.setRoles(roleList);
         
         /*



Mime
View raw message