incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgog...@apache.org
Subject svn commit: r1189517 - in /incubator/ambari/trunk: ./ client/src/main/java/org/apache/ambari/client/ client/src/main/java/org/apache/ambari/common/rest/entities/ controller/src/main/java/org/apache/ambari/controller/ controller/src/main/java/org/apache...
Date Wed, 26 Oct 2011 22:51:31 GMT
Author: vgogate
Date: Wed Oct 26 22:51:30 2011
New Revision: 1189517

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

Added:
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Stack.java
      - copied, changed from r1189510, 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/StackInformation.java
      - copied, changed from r1189510, incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/BlueprintInformation.java
Removed:
    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/BlueprintInformation.java
Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintAdd.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintGet.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintHistory.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintList.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterBlueprint.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterCreate.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterUpdate.java
    incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/Command.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/Cluster.java
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Clusters.java
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/BlueprintResource.java
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/BlueprintsResource.java
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/ClusterResource.java

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed Oct 26 22:51:30 2011
@@ -2,6 +2,8 @@ Ambari Change log
 
 Release 0.1.0 - unreleased
 
+  AMBARI-108. Change name blueprint to stack (vgogate)
+
   AMBARI-106. Fixes some javadoc stuff (ddas)
 
   AMBARI-105. Remove post on clusters resource to create new cluster (instead use put operation on cluster resource along with update cluster) (vgogate)

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintAdd.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintAdd.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintAdd.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintAdd.java Wed Oct 26 22:51:30 2011
@@ -32,7 +32,7 @@ import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
+import org.apache.ambari.common.rest.entities.Stack;
 import org.apache.ambari.common.rest.entities.ClusterDefinition;
 import org.apache.ambari.common.rest.entities.ClusterInformation;
 import org.apache.ambari.common.rest.entities.ClusterState;
@@ -151,39 +151,39 @@ public class BlueprintAdd extends Comman
                 System.out.println("Specified location is either a file path that does not exist or a malformed URL");
                 System.exit(-1);
             }
-            Blueprint bp = new Blueprint();
+            Stack bp = new Stack();
             response = service.path("blueprints/"+name)
                     .queryParam("url", location)
                     .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_XML).put(ClientResponse.class, bp);
         } else {
-            Blueprint bp = this.readBlueprintFromXMLFile(f);
+            Stack bp = this.readStackFromXMLFile(f);
             response = service.path("blueprints/"+name)
                     .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_XML).put(ClientResponse.class, bp);
         }     
         
         if (response.getStatus() != 200) { 
-            System.err.println("Blueprint add command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
+            System.err.println("Stack add command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
             System.exit(-1);
         }
         
-        Blueprint bp_return = response.getEntity(Blueprint.class);
+        Stack bp_return = response.getEntity(Stack.class);
         
-        System.out.println("Blueprint added.\n");
-        printBlueprint(bp_return, null);
+        System.out.println("Stack added.\n");
+        printStack(bp_return, null);
     }
     
-    public Blueprint readBlueprintFromXMLFile (File f) throws Exception {      
-        JAXBContext jc = JAXBContext.newInstance(org.apache.ambari.common.rest.entities.Blueprint.class);
+    public Stack readStackFromXMLFile (File f) throws Exception {      
+        JAXBContext jc = JAXBContext.newInstance(org.apache.ambari.common.rest.entities.Stack.class);
         Unmarshaller u = jc.createUnmarshaller();
-        Blueprint bp = (Blueprint)u.unmarshal(f);
+        Stack bp = (Stack)u.unmarshal(f);
         return bp;
     }
     
-    public Blueprint readBlueprintFromJSONFile (File f) throws Exception {      
+    public Stack readStackFromJSONFile (File f) throws Exception {      
         FileInputStream fis = new FileInputStream(f);
         ObjectMapper m = new ObjectMapper();
-        Blueprint blueprint = m.readValue(fis, Blueprint.class);
-        return blueprint;
+        Stack stack = m.readValue(fis, Stack.class);
+        return stack;
     }
     
     

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintGet.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintGet.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintGet.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintGet.java Wed Oct 26 22:51:30 2011
@@ -25,7 +25,7 @@ import java.util.List;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriBuilder;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
+import org.apache.ambari.common.rest.entities.Stack;
 import org.apache.ambari.common.rest.entities.ClusterDefinition;
 import org.apache.ambari.common.rest.entities.ClusterInformation;
 import org.apache.ambari.common.rest.entities.ClusterState;
@@ -151,15 +151,15 @@ public class BlueprintGet extends Comman
                     .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON).get(ClientResponse.class);
         }        
         if (response.getStatus() != 200) { 
-            System.err.println("Blueprint get command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
+            System.err.println("Stack get command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
             System.exit(-1);
         }
         
         /* 
          * Retrieve the cluster Information from the response
          */
-        Blueprint bp = response.getEntity(Blueprint.class);
+        Stack bp = response.getEntity(Stack.class);
         
-        printBlueprint(bp, file_path);
+        printStack(bp, file_path);
     }
 }

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintHistory.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintHistory.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintHistory.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintHistory.java Wed Oct 26 22:51:30 2011
@@ -24,7 +24,7 @@ import java.util.List;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriBuilder;
 
-import org.apache.ambari.common.rest.entities.BlueprintInformation;
+import org.apache.ambari.common.rest.entities.StackInformation;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.CommandLineParser;
 import org.apache.commons.cli.GnuParser;
@@ -128,25 +128,25 @@ public class BlueprintHistory extends Co
          */
         ClientResponse response = service.path("blueprints/"+blueprintName+"/revisions").accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON).get(ClientResponse.class);
         if (response.getStatus() == 404) { 
-            System.out.println("Blueprint ["+blueprintName+"] does not exist");
+            System.out.println("Stack ["+blueprintName+"] does not exist");
             System.exit(-1);
         }
         
         if (response.getStatus() == 204) {
-            System.out.println("No revisions available for Blueprint ["+blueprintName+"]");
+            System.out.println("No revisions available for Stack ["+blueprintName+"]");
             System.exit(0);
         }
         
         if (response.getStatus() != 200) { 
-            System.err.println("Blueprint history command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
+            System.err.println("Stack history command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
             System.exit(-1);
         }
         /* 
          * Retrieve the blueprint Information list from the response
          */
-        List<BlueprintInformation> bpInfos = response.getEntity(new GenericType<List<BlueprintInformation>>(){});
-        for (BlueprintInformation bpInfo : bpInfos) {
-            printBlueprintInformation (service, bpInfo, tree);
+        List<StackInformation> bpInfos = response.getEntity(new GenericType<List<StackInformation>>(){});
+        for (StackInformation bpInfo : bpInfos) {
+            printStackInformation (service, bpInfo, tree);
         }
     }
 }
\ No newline at end of file

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintList.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintList.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintList.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/BlueprintList.java Wed Oct 26 22:51:30 2011
@@ -32,8 +32,8 @@ import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
-import org.apache.ambari.common.rest.entities.BlueprintInformation;
+import org.apache.ambari.common.rest.entities.Stack;
+import org.apache.ambari.common.rest.entities.StackInformation;
 import org.apache.ambari.common.rest.entities.ClusterDefinition;
 import org.apache.ambari.common.rest.entities.ClusterInformation;
 import org.apache.ambari.common.rest.entities.ClusterState;
@@ -142,7 +142,7 @@ public class BlueprintList extends Comma
             ClientResponse response = service.path("blueprints/"+name)
                     .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON).get(ClientResponse.class);
             if (response.getStatus() != 404 && response.getStatus() != 200) { 
-                System.err.println("Blueprint list command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
+                System.err.println("Stack list command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
                 System.exit(-1);
             }
             if (response.getStatus() == 404) {
@@ -151,14 +151,14 @@ public class BlueprintList extends Comma
             /* 
              * Retrieve the blueprint from the response
              */
-            Blueprint blueprint = response.getEntity(Blueprint.class);
-            printBlueprintInformation (service, blueprint, tree);
+            Stack stack = response.getEntity(Stack.class);
+            printStackInformation (service, stack, tree);
            
         } else {
             ClientResponse response = service.path("blueprints")
                     .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON).get(ClientResponse.class);
             if (response.getStatus() != 200 && response.getStatus() != 204) { 
-                System.err.println("Blueprint list command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
+                System.err.println("Stack list command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
                 System.exit(-1);
             }
             if (response.getStatus() == 204) {
@@ -168,9 +168,9 @@ public class BlueprintList extends Comma
             /* 
              * Retrieve the blueprint Information list from the response
              */
-            List<BlueprintInformation> bpInfos = response.getEntity(new GenericType<List<BlueprintInformation>>(){});
-            for (BlueprintInformation bpInfo : bpInfos) {
-                printBlueprintInformation (service, bpInfo, tree);
+            List<StackInformation> bpInfos = response.getEntity(new GenericType<List<StackInformation>>(){});
+            for (StackInformation bpInfo : bpInfos) {
+                printStackInformation (service, bpInfo, tree);
             }
         }
         

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterBlueprint.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterBlueprint.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterBlueprint.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterBlueprint.java Wed Oct 26 22:51:30 2011
@@ -22,7 +22,7 @@ import java.net.URL;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriBuilder;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
+import org.apache.ambari.common.rest.entities.Stack;
 import org.apache.ambari.common.rest.entities.ClusterInformation;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.CommandLineParser;
@@ -137,7 +137,7 @@ public class ClusterBlueprint extends Co
         /* 
          * Retrieve the cluster blueprint
          */
-        Blueprint blueprint = response.getEntity(Blueprint.class);
-        printBlueprint(blueprint, line.getOptionValue("file"));
+        Stack stack = response.getEntity(Stack.class);
+        printStack(stack, line.getOptionValue("file"));
     }
 }

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterCreate.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterCreate.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterCreate.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterCreate.java Wed Oct 26 22:51:30 2011
@@ -29,7 +29,7 @@ import javax.ws.rs.core.UriBuilder;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
+import org.apache.ambari.common.rest.entities.Stack;
 import org.apache.ambari.common.rest.entities.ClusterDefinition;
 import org.apache.ambari.common.rest.entities.ClusterState;
 import org.apache.ambari.common.rest.entities.RoleToNodes;
@@ -104,7 +104,7 @@ public class ClusterCreate extends Comma
         
         OptionBuilder.withArgName( "blueprint_revision" );
         OptionBuilder.hasArg();
-        OptionBuilder.withDescription(  "Blueprint revision, if not specified latest revision is used" );
+        OptionBuilder.withDescription(  "Stack revision, if not specified latest revision is used" );
         Option revision = OptionBuilder.create( "revision" );
         
         OptionBuilder.withArgName( "description" );
@@ -220,18 +220,18 @@ public class ClusterCreate extends Comma
         	ClientResponse response = service.path("blueprints/"+line.getOptionValue("blueprint"))
                     .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON).get(ClientResponse.class);
             if (response.getStatus() != 404 && response.getStatus() != 200) { 
-                System.err.println("Blueprint list command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
+                System.err.println("Stack list command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
                 System.exit(-1);
             }
             if (response.getStatus() == 404) {
-            	System.err.println("Blueprint name:" + line.getOptionValue("blueprint") + " does not exist.");
+            	System.err.println("Stack name:" + line.getOptionValue("blueprint") + " does not exist.");
                 System.exit(-1);
             }
             /* 
              * Retrieve the blueprint from the response
              */
-            Blueprint blueprint = response.getEntity(Blueprint.class);
-            revision = blueprint.getRevision();
+            Stack stack = response.getEntity(Stack.class);
+            revision = stack.getRevision();
         }
         clsDef.setBlueprintRevision(revision);
         clsDef.setActiveServices(splitServices(line.getOptionValue("services")));

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterUpdate.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterUpdate.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterUpdate.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/ClusterUpdate.java Wed Oct 26 22:51:30 2011
@@ -100,7 +100,7 @@ public class ClusterUpdate extends Comma
         
         OptionBuilder.withArgName( "blueprint_revision" );
         OptionBuilder.hasArg();
-        OptionBuilder.withDescription(  "Blueprint revision" );
+        OptionBuilder.withDescription(  "Stack revision" );
         Option revision = OptionBuilder.create( "revision" );
         
         OptionBuilder.withArgName( "description" );

Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/Command.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/Command.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/Command.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/client/Command.java Wed Oct 26 22:51:30 2011
@@ -25,8 +25,8 @@ import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
-import org.apache.ambari.common.rest.entities.BlueprintInformation;
+import org.apache.ambari.common.rest.entities.Stack;
+import org.apache.ambari.common.rest.entities.StackInformation;
 import org.apache.ambari.common.rest.entities.ClusterDefinition;
 import org.apache.ambari.common.rest.entities.ClusterInformation;
 import org.apache.ambari.common.rest.entities.Node;
@@ -76,7 +76,7 @@ public abstract class Command {
         
         OptionBuilder.withArgName( "blueprint_revision" );
         OptionBuilder.hasArg();
-        OptionBuilder.withDescription(  "Blueprint revision, if not specified latest revision is used" );
+        OptionBuilder.withDescription(  "Stack revision, if not specified latest revision is used" );
         Option blueprint_revision = OptionBuilder.create( "revision" );
         
         OptionBuilder.withArgName( "description" );
@@ -136,21 +136,21 @@ public abstract class Command {
         m.marshal(node, System.out);
     }
     
-    public void printBlueprint(Blueprint blueprint, String file_path) throws Exception {
-        JAXBContext jc = JAXBContext.newInstance(org.apache.ambari.common.rest.entities.Blueprint.class);
+    public void printStack(Stack stack, String file_path) throws Exception {
+        JAXBContext jc = JAXBContext.newInstance(org.apache.ambari.common.rest.entities.Stack.class);
         Marshaller m = jc.createMarshaller();
         m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
         if (file_path == null) {
-            m.marshal(blueprint, System.out);
+            m.marshal(stack, System.out);
         } else {
-            m.marshal(blueprint, new File(file_path));
+            m.marshal(stack, new File(file_path));
         }
     }
     
     /*
-     * TODO: Return Blueprint objects instead of BlueprintInformation???
+     * TODO: Return Stack objects instead of StackInformation???
      */
-    public void printBlueprintInformation (WebResource service, BlueprintInformation bpInfo, boolean tree) {
+    public void printStackInformation (WebResource service, StackInformation bpInfo, boolean tree) {
         
         System.out.println("\nName:["+bpInfo.getName()+"], Revision:["+bpInfo.getRevision()+"]");
         
@@ -161,7 +161,7 @@ public abstract class Command {
                 ClientResponse response = service.path("blueprints/"+bpInfo.getParentName())
                         .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON).get(ClientResponse.class);
                 if (response.getStatus() != 404 && response.getStatus() != 200) { 
-                    System.err.println("Blueprint list command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
+                    System.err.println("Stack list command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
                     System.exit(-1);
                 }
                 if (response.getStatus() == 404) {
@@ -171,7 +171,7 @@ public abstract class Command {
                  * Retrieve the blueprint from the response
                  * TODO: 
                  */
-                Blueprint bp = response.getEntity(Blueprint.class);
+                Stack bp = response.getEntity(Stack.class);
                 bpInfo.setName(bp.getName());
                 bpInfo.setParentName(bp.getParentName());
                 bpInfo.setRevision(bp.getRevision());
@@ -181,7 +181,7 @@ public abstract class Command {
         } 
     }
     
-    public void printBlueprintInformation (WebResource service, Blueprint bp, boolean tree) {
+    public void printStackInformation (WebResource service, Stack bp, boolean tree) {
         System.out.println("\nName:["+bp.getName()+"], Revision:["+bp.getRevision()+"]");
 
         if (tree) {
@@ -192,7 +192,7 @@ public abstract class Command {
                 ClientResponse response = service.path("blueprints/"+bp.getParentName())
                         .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON).get(ClientResponse.class);
                 if (response.getStatus() != 404 && response.getStatus() != 200) { 
-                    System.err.println("Blueprint list command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
+                    System.err.println("Stack list command failed. Reason [Code: <"+response.getStatus()+">, Message: <"+response.getHeaders().getFirst("ErrorMessage")+">]");
                     System.exit(-1);
                 }
                 if (response.getStatus() == 404) {
@@ -201,7 +201,7 @@ public abstract class Command {
                 /* 
                  * Retrieve the blueprint from the response
                  */
-                bp = response.getEntity(Blueprint.class);
+                bp = response.getEntity(Stack.class);
                 tab = tab+"        ";
             }
         }

Copied: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Stack.java (from r1189510, 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/Stack.java?p2=incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Stack.java&p1=incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/Blueprint.java&r1=1189510&r2=1189517&rev=1189517&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/Stack.java Wed Oct 26 22:51:30 2011
@@ -35,11 +35,11 @@ import javax.xml.datatype.XMLGregorianCa
 
 
 /**
- * <p>Java class for BlueprintType complex type.
+ * <p>Java class for Stack type.
  * 
  */
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "blueprint", propOrder = {
+@XmlType(name = "stack", propOrder = {
     "name",
     "revision",
     "parentName",
@@ -49,8 +49,8 @@ import javax.xml.datatype.XMLGregorianCa
     "configuration",
     "components"
 })
-@XmlRootElement(name="blueprint")
-public class Blueprint {
+@XmlRootElement(name="stack")
+public class Stack {
 
     @XmlAttribute
     protected String name;

Copied: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/StackInformation.java (from r1189510, incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/BlueprintInformation.java)
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/StackInformation.java?p2=incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/StackInformation.java&p1=incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/BlueprintInformation.java&r1=1189510&r2=1189517&rev=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/BlueprintInformation.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/StackInformation.java Wed Oct 26 22:51:30 2011
@@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.datatype.XMLGregorianCalendar;
 
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "BlueprintInformation", propOrder = {
+@XmlType(name = "StackInformation", propOrder = {
     "name",
     "revision",
     "parentName",
@@ -38,7 +38,7 @@ import javax.xml.datatype.XMLGregorianCa
     "component"
 })
 @XmlRootElement
-public class BlueprintInformation {
+public class StackInformation {
 
     @XmlAttribute
     protected String name;

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=1189517&r1=1189516&r2=1189517&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 Wed Oct 26 22:51:30 2011
@@ -38,8 +38,8 @@ import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Unmarshaller;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
-import org.apache.ambari.common.rest.entities.BlueprintInformation;
+import org.apache.ambari.common.rest.entities.Stack;
+import org.apache.ambari.common.rest.entities.StackInformation;
 import org.apache.ambari.common.rest.entities.Component;
 import org.apache.ambari.common.rest.entities.Property;
 import org.codehaus.jettison.json.JSONException;
@@ -70,10 +70,10 @@ public class Blueprints {
                 "org/apache/ambari/stacks/" + name + "-" + revision + ".xml";
             InputStream in = 
                 ClassLoader.getSystemResourceAsStream(resourceName);
-            Blueprint bp = (Blueprint) um.unmarshal(in);
+            Stack bp = (Stack) um.unmarshal(in);
             bp.setName(name);
             bp.setRevision(Integer.toString(revision));
-            addBlueprint(bp);
+            addStack(bp);
         } catch (IOException e) {
             Log.warn("Problem loading blueprint " + name + " rev " + revision,
                      e);
@@ -95,35 +95,35 @@ public class Blueprints {
     }
       
     /*
-     * Blueprint name -> {revision -> Blueprint} .
+     * Stack name -> {revision -> Stack} .
      */
-    protected ConcurrentHashMap<String, ConcurrentHashMap<Integer,Blueprint>> blueprints = new ConcurrentHashMap<String,ConcurrentHashMap<Integer,Blueprint>>();
+    protected ConcurrentHashMap<String, ConcurrentHashMap<Integer,Stack>> stacks = new ConcurrentHashMap<String,ConcurrentHashMap<Integer,Stack>>();
     
     
     /*
      * Get blueprint. If revision = -1 then return latest revision
      */
-    public Blueprint getBlueprint(String blueprintName, int revision) throws Exception {
+    public Stack getStack(String blueprintName, int revision) throws Exception {
         /*
          * If revision is -1, then return the latest revision
          */  
-        Blueprint bp = null;
-        if (!this.blueprints.containsKey(blueprintName)) {  
-            String msg = "Blueprint ["+blueprintName+"] is not defined";
+        Stack bp = null;
+        if (!this.stacks.containsKey(blueprintName)) {  
+            String msg = "Stack ["+blueprintName+"] is not defined";
             throw new WebApplicationException ((new ExceptionResponse(msg, Response.Status.NOT_FOUND)).get());
         }
         if (revision == -1) {
-            this.blueprints.get(blueprintName).keySet();
+            this.stacks.get(blueprintName).keySet();
             Integer [] a = new Integer [] {};
-            Integer[] keys = this.blueprints.get(blueprintName).keySet().toArray(a);
+            Integer[] keys = this.stacks.get(blueprintName).keySet().toArray(a);
             Arrays.sort(keys);  
-            bp = this.blueprints.get(blueprintName).get(keys[keys.length-1]);
+            bp = this.stacks.get(blueprintName).get(keys[keys.length-1]);
         } else {
-            if (!this.blueprints.get(blueprintName).containsKey(revision)) {  
-                String msg = "Blueprint ["+blueprintName+"], revision ["+revision+"] does not exist";
+            if (!this.stacks.get(blueprintName).containsKey(revision)) {  
+                String msg = "Stack ["+blueprintName+"], revision ["+revision+"] does not exist";
                 throw new WebApplicationException ((new ExceptionResponse(msg, Response.Status.NOT_FOUND)).get());
             }
-            bp = this.blueprints.get(blueprintName).get(revision);
+            bp = this.stacks.get(blueprintName).get(revision);
         }
         return bp;  
     }
@@ -131,24 +131,24 @@ public class Blueprints {
     /*
      * Add or update the blueprint
      */
-    public Blueprint addBlueprint(Blueprint bp) throws IOException {
+    public Stack addStack(Stack bp) throws IOException {
         
         /*
          * Validate and set the defaults
          */
-        validateAndSetBlueprintDefaults(bp);
+        validateAndSetStackDefaults(bp);
         
-        if (blueprints.containsKey(bp.getName())) {
-            if (blueprints.get(bp.getName()).containsKey(new Integer(bp.getRevision()))) {
+        if (stacks.containsKey(bp.getName())) {
+            if (stacks.get(bp.getName()).containsKey(new Integer(bp.getRevision()))) {
                 String msg = "Specified blueprint [Name:"+bp.getName()+", Revision: ["+bp.getRevision()+"] already imported";
                 throw new WebApplicationException((new ExceptionResponse(msg, Response.Status.BAD_REQUEST)).get());
             } else {
-                blueprints.get(bp.getName()).put(new Integer(bp.getRevision()), bp);
+                stacks.get(bp.getName()).put(new Integer(bp.getRevision()), bp);
             }
         } else {
-            ConcurrentHashMap<Integer, Blueprint> x = new ConcurrentHashMap<Integer, Blueprint>();
+            ConcurrentHashMap<Integer, Stack> x = new ConcurrentHashMap<Integer, Stack>();
             x.put(new Integer(bp.getRevision()), bp);
-            this.blueprints.put(bp.getName(), x);
+            this.stacks.put(bp.getName(), x);
         }
         
         return bp;
@@ -157,8 +157,8 @@ public class Blueprints {
     /*
      * Import the default blueprint from the URL location
      */
-    public Blueprint importDefaultBlueprint (String locationURL) throws IOException {
-        Blueprint blueprint;
+    public Stack importDefaultStack (String locationURL) throws IOException {
+        Stack stack;
         URL blueprintUrl;
         try {
             blueprintUrl = new URL(locationURL);
@@ -166,12 +166,12 @@ public class Blueprints {
             
             /* JSON FORMAT READER
             ObjectMapper m = new ObjectMapper();
-            blueprint = m.readValue(is, Blueprint.class);
+            blueprint = m.readValue(is, Stack.class);
             */
-            JAXBContext jc = JAXBContext.newInstance(org.apache.ambari.common.rest.entities.Blueprint.class);
+            JAXBContext jc = JAXBContext.newInstance(org.apache.ambari.common.rest.entities.Stack.class);
             Unmarshaller u = jc.createUnmarshaller();
-            blueprint = (Blueprint)u.unmarshal(is);
-            return addBlueprint(blueprint);
+            stack = (Stack)u.unmarshal(is);
+            return addStack(stack);
         } catch (WebApplicationException we) {
             throw we;
         } catch (Exception e) {
@@ -182,44 +182,44 @@ public class Blueprints {
     /*
      * Validate the blueprint before importing into controller
      */
-    public void validateAndSetBlueprintDefaults(Blueprint blueprint) throws IOException {
+    public void validateAndSetStackDefaults(Stack stack) throws IOException {
         
-        if (blueprint.getName() == null || blueprint.getName().equals("")) {
-            String msg = "Blueprint must be associated with non-empty name";
+        if (stack.getName() == null || stack.getName().equals("")) {
+            String msg = "Stack must be associated with non-empty name";
             throw new WebApplicationException ((new ExceptionResponse(msg, Response.Status.BAD_REQUEST)).get());
         }
-        if (blueprint.getRevision() == null || blueprint.getRevision().equals("") ||
-            blueprint.getRevision().equalsIgnoreCase("null")) {
-            blueprint.setRevision("-1");
-        }
-        if (blueprint.getParentName() != null && 
-            (blueprint.getParentName().equals("") || blueprint.getParentName().equalsIgnoreCase("null"))) {
-            blueprint.setParentName(null);
-        }
-        if (blueprint.getParentRevision() == null || blueprint.getParentRevision().equals("") ||
-            blueprint.getParentRevision().equalsIgnoreCase("null")) {
-            blueprint.setParentRevision("-1");
+        if (stack.getRevision() == null || stack.getRevision().equals("") ||
+            stack.getRevision().equalsIgnoreCase("null")) {
+            stack.setRevision("-1");
+        }
+        if (stack.getParentName() != null && 
+            (stack.getParentName().equals("") || stack.getParentName().equalsIgnoreCase("null"))) {
+            stack.setParentName(null);
+        }
+        if (stack.getParentRevision() == null || stack.getParentRevision().equals("") ||
+            stack.getParentRevision().equalsIgnoreCase("null")) {
+            stack.setParentRevision("-1");
         }
         /*
          * Set the creation time 
          */
-        blueprint.setCreationTime(new Date());
+        stack.setCreationTime(new Date());
     }
     
     /*
      *  Get the list of blueprint revisions
      */
-    public List<BlueprintInformation> getBlueprintRevisions(String blueprintName) throws Exception {
-        List<BlueprintInformation> list = new ArrayList<BlueprintInformation>();
-        if (!this.blueprints.containsKey(blueprintName)) {
-            String msg = "Blueprint ["+blueprintName+"] does not exist";
+    public List<StackInformation> getBlueprintRevisions(String blueprintName) throws Exception {
+        List<StackInformation> list = new ArrayList<StackInformation>();
+        if (!this.stacks.containsKey(blueprintName)) {
+            String msg = "Stack ["+blueprintName+"] does not exist";
             throw new WebApplicationException ((new ExceptionResponse(msg, Response.Status.NOT_FOUND)).get());
         }
-        ConcurrentHashMap<Integer, Blueprint> revisions = this.blueprints.get(blueprintName);
+        ConcurrentHashMap<Integer, Stack> revisions = this.stacks.get(blueprintName);
         for (Integer x : revisions.keySet()) {
             // Get the latest blueprint
-            Blueprint bp = revisions.get(x);
-            BlueprintInformation bpInfo = new BlueprintInformation();
+            Stack bp = revisions.get(x);
+            StackInformation bpInfo = new StackInformation();
             // TODO: get the creation time from blueprint
             bpInfo.setCreationTime(bp.getCreationTime());
             bpInfo.setName(bp.getName());
@@ -240,12 +240,12 @@ public class Blueprints {
     /*
      * Return list of blueprint names
      */
-    public List<BlueprintInformation> getBlueprintList() throws Exception {
-        List<BlueprintInformation> list = new ArrayList<BlueprintInformation>();
-        for (String bpName : this.blueprints.keySet()) {
+    public List<StackInformation> getBlueprintList() throws Exception {
+        List<StackInformation> list = new ArrayList<StackInformation>();
+        for (String bpName : this.stacks.keySet()) {
             // Get the latest blueprint
-            Blueprint bp = this.getBlueprint(bpName, -1);
-            BlueprintInformation bpInfo = new BlueprintInformation();
+            Stack bp = this.getStack(bpName, -1);
+            StackInformation bpInfo = new StackInformation();
             // TODO: get the creation and update times from blueprint
             bpInfo.setCreationTime(bp.getCreationTime());
             bpInfo.setName(bp.getName());
@@ -281,27 +281,27 @@ public class Blueprints {
         /*
          * If no cluster is associated then remove the blueprint
          */
-        this.blueprints.get(blueprintName).remove(revision);
-        if (this.blueprints.get(blueprintName).keySet().isEmpty()) {
-            this.blueprints.remove(blueprintName);
+        this.stacks.get(blueprintName).remove(revision);
+        if (this.stacks.get(blueprintName).keySet().isEmpty()) {
+            this.stacks.remove(blueprintName);
         }    
     }
     
     /*
-     * Returns the <key="name-revision", value=""> hash table for cluster referenced blueprints
+     * Returns the <key="name-revision", value=""> hash table for cluster referenced stacks
      */
     public Hashtable<String, String> getClusterReferencedBlueprintsList() throws Exception {
         Hashtable<String, String> clusterBlueprints = new Hashtable<String, String>();
         for (Cluster c : Clusters.getInstance().operational_clusters.values()) {
             String cBPName = c.getLatestClusterDefinition().getBlueprintName();
             String cBPRevision = c.getLatestClusterDefinition().getBlueprintRevision();
-            Blueprint bpx = this.getBlueprint(cBPName, Integer.parseInt(cBPRevision));
+            Stack bpx = this.getStack(cBPName, Integer.parseInt(cBPRevision));
             clusterBlueprints.put(cBPName+"-"+cBPRevision, "");
             while (bpx.getParentName() != null) {
                 if (bpx.getParentRevision() == null) {
-                    bpx = this.getBlueprint(bpx.getParentName(), -1);
+                    bpx = this.getStack(bpx.getParentName(), -1);
                 } else {
-                    bpx = this.getBlueprint(bpx.getParentName(), Integer.parseInt(bpx.getParentRevision()));
+                    bpx = this.getStack(bpx.getParentName(), Integer.parseInt(bpx.getParentRevision()));
                 }
                 clusterBlueprints.put(bpx.getName()+"-"+bpx.getRevision(), "");
             }

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Cluster.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Cluster.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Cluster.java (original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Cluster.java Wed Oct 26 22:51:30 2011
@@ -22,7 +22,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
+import org.apache.ambari.common.rest.entities.Stack;
 import org.apache.ambari.common.rest.entities.ClusterDefinition;
 import org.apache.ambari.common.rest.entities.ClusterState;
 import org.apache.ambari.common.rest.entities.Component;
@@ -79,7 +79,7 @@ public class Cluster {
       definition = c;
       // find the plugins for the current definition of the cluster
       Blueprints context = Blueprints.getInstance();
-      Blueprint bp = context.getBlueprint(c.getBlueprintName(),
+      Stack bp = context.getStack(c.getBlueprintName(),
                                    Integer.parseInt(c.getBlueprintRevision()));
       
       //while (!bp.getName().equals(bp.getParentName()) || !bp.getRevision().equals(bp.getParentRevision())) {    
@@ -92,7 +92,7 @@ public class Cluster {
         }
         
         // go up to the parent
-        bp = context.getBlueprint(bp.getParentName(), 
+        bp = context.getStack(bp.getParentName(), 
                                   Integer.parseInt(bp.getParentRevision()));
       }
     }

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Clusters.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Clusters.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Clusters.java (original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/Clusters.java Wed Oct 26 22:51:30 2011
@@ -27,7 +27,7 @@ import java.util.concurrent.ConcurrentHa
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
+import org.apache.ambari.common.rest.entities.Stack;
 import org.apache.ambari.common.rest.entities.ClusterDefinition;
 import org.apache.ambari.common.rest.entities.ClusterInformation;
 import org.apache.ambari.common.rest.entities.ClusterState;
@@ -457,15 +457,15 @@ public class Clusters {
          * Check if the cluster blueprint and its parents exist
          * getBlueprint would throw exception if it does not find the blueprint
          */
-        Blueprint bp = Blueprints.getInstance()
-                       .getBlueprint(cdef.getBlueprintName(), Integer.parseInt(cdef.getBlueprintRevision()));
+        Stack bp = Blueprints.getInstance()
+                       .getStack(cdef.getBlueprintName(), Integer.parseInt(cdef.getBlueprintRevision()));
         while (bp.getParentName() != null) {
             if (bp.getParentRevision() == null) {
                 bp = Blueprints.getInstance()
-                    .getBlueprint(bp.getParentName(), -1);
+                    .getStack(bp.getParentName(), -1);
             } else {
                 bp = Blueprints.getInstance()
-                .getBlueprint(bp.getParentName(), Integer.parseInt(bp.getParentRevision()));
+                .getStack(bp.getParentName(), Integer.parseInt(bp.getParentRevision()));
             }
         }
         
@@ -643,7 +643,7 @@ public class Clusters {
     /*
      * Get Cluster blueprint
      */
-    public Blueprint getClusterBlueprint(String clusterName, boolean expanded) throws Exception {
+    public Stack getClusterStack(String clusterName, boolean expanded) throws Exception {
         if (!this.operational_clusters.containsKey(clusterName)) {
             String msg = "Cluster ["+clusterName+"] does not exist";
             throw new WebApplicationException((new ExceptionResponse(msg, Response.Status.NOT_FOUND)).get());
@@ -653,12 +653,12 @@ public class Clusters {
         String blueprintName = cls.getLatestClusterDefinition().getBlueprintName();
         int blueprintRevision = Integer.parseInt(cls.getLatestClusterDefinition().getBlueprintRevision());
         
-        Blueprint bp;
+        Stack bp;
         if (!expanded) {
-            bp = Blueprints.getInstance().getBlueprint(blueprintName, blueprintRevision);
+            bp = Blueprints.getInstance().getStack(blueprintName, blueprintRevision);
         } else {
             // TODO: Get the derived/expanded blueprint
-            bp = Blueprints.getInstance().getBlueprint(blueprintName, blueprintRevision);
+            bp = Blueprints.getInstance().getStack(blueprintName, blueprintRevision);
         }
         return bp;
     }

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/BlueprintResource.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/BlueprintResource.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/BlueprintResource.java (original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/BlueprintResource.java Wed Oct 26 22:51:30 2011
@@ -31,8 +31,8 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
-import org.apache.ambari.common.rest.entities.BlueprintInformation;
+import org.apache.ambari.common.rest.entities.Stack;
+import org.apache.ambari.common.rest.entities.StackInformation;
 import org.apache.ambari.controller.Blueprints;
 import org.apache.ambari.controller.ExceptionResponse;
 
@@ -40,7 +40,7 @@ import org.apache.ambari.controller.Exce
  *  cluster. Blueprints define a collection of Hadoop components that are
  *  installed together on a cluster and their configuration.
  */
-@Path(value = "/blueprints/{blueprintName}")
+@Path(value = "/stacks/{blueprintName}")
 public class BlueprintResource {
         
     /** 
@@ -57,10 +57,10 @@ public class BlueprintResource {
      */
     @GET
     @Produces({"application/json", "application/xml"})
-    public Blueprint getBlueprint(@PathParam("blueprintName") String blueprintName, 
+    public Stack getStack(@PathParam("blueprintName") String blueprintName, 
                                   @DefaultValue("-1") @QueryParam("revision") String revision) throws Exception {     
         try {
-            return Blueprints.getInstance().getBlueprint(blueprintName, Integer.parseInt(revision));
+            return Blueprints.getInstance().getStack(blueprintName, Integer.parseInt(revision));
         }catch (WebApplicationException we) {
             throw we;
         }catch (Exception e) {
@@ -82,9 +82,9 @@ public class BlueprintResource {
     @Path(value = "/revisions")
     @GET
     @Produces({"application/json", "application/xml"})
-    public List<BlueprintInformation> getBlueprintRevisions(@PathParam("blueprintName") String blueprintName) throws Exception {     
+    public List<StackInformation> getBlueprintRevisions(@PathParam("blueprintName") String blueprintName) throws Exception {     
         try {
-            List<BlueprintInformation> list = Blueprints.getInstance().getBlueprintRevisions(blueprintName);
+            List<StackInformation> list = Blueprints.getInstance().getBlueprintRevisions(blueprintName);
             if (list.isEmpty()) {
                 throw new WebApplicationException(Response.Status.NO_CONTENT);
             }
@@ -129,7 +129,7 @@ public class BlueprintResource {
      * If named blueprint does not exist already, then it is created with revision zero.
      * If named blueprint exists, then it is updated as new revision.
      * Optional locationURL query parameter can specify the location of the repository of
-     * of blueprints. If specified then blueprint is downloaded from the repository.
+     * of stacks. If specified then blueprint is downloaded from the repository.
      *
      * @response.representation.200.doc         Successfully created the new or updated the existing blueprint.
      * @response.representation.200.mediaType   application/json
@@ -139,20 +139,20 @@ public class BlueprintResource {
      * 
      * @param blueprintName Name of the blueprint
      * @param locationURL   URL pointing to the location of the blueprint
-     * @param blueprint     Input blueprint object specifying the blueprint definition
+     * @param stack     Input blueprint object specifying the blueprint definition
      * @return              Returns the new revision of the blueprint
      * @throws Exception    throws Exception
      */
     @PUT
     @Consumes({"application/json", "application/xml"})
-    public Blueprint updateBlueprint(@PathParam("blueprintName") String blueprintName, 
+    public Stack updateStack(@PathParam("blueprintName") String blueprintName, 
                                      @DefaultValue("") @QueryParam("url") String locationURL,
-                                     Blueprint blueprint) throws Exception {
+                                     Stack stack) throws Exception {
         try {
             if (locationURL == null || locationURL.equals("")) {
-                return Blueprints.getInstance().addBlueprint(blueprint);
+                return Blueprints.getInstance().addStack(stack);
             } else {
-                return Blueprints.getInstance().importDefaultBlueprint (locationURL);
+                return Blueprints.getInstance().importDefaultStack (locationURL);
             }
         }catch (WebApplicationException we) {
             throw we;

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/BlueprintsResource.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/BlueprintsResource.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/BlueprintsResource.java (original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/BlueprintsResource.java Wed Oct 26 22:51:30 2011
@@ -32,8 +32,8 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
 
-import org.apache.ambari.common.rest.entities.Blueprint;
-import org.apache.ambari.common.rest.entities.BlueprintInformation;
+import org.apache.ambari.common.rest.entities.Stack;
+import org.apache.ambari.common.rest.entities.StackInformation;
 import org.apache.ambari.controller.Blueprints;
 import org.apache.ambari.controller.ExceptionResponse;
 import org.codehaus.jettison.json.JSONArray;
@@ -43,23 +43,23 @@ import org.codehaus.jettison.json.JSONAr
  * cluster. Blueprints define a collection of Hadoop components that are
  * installed together on a cluster and their configuration.
  */
-@Path(value = "/blueprints")
+@Path(value = "/stacks")
 public class BlueprintsResource {
  
     /** 
-     * Get the list of blueprints
+     * Get the list of stacks
      * 
      * @response.representation.200.doc         Successful
      * @response.representation.200.mediaType   application/json
      * @response.representation.204.doc         List is empty.
      *  
-     * @return Returns the list of BlueprintInformation items
+     * @return Returns the list of StackInformation items
      * @throws Exception
      */
     @GET
     @Produces({"application/json", "application/xml"})
-    public List<BlueprintInformation> listBlueprints() throws Exception {
-        List<BlueprintInformation> list;
+    public List<StackInformation> listBlueprints() throws Exception {
+        List<StackInformation> list;
         try {
             list = Blueprints.getInstance().getBlueprintList();
             if (list.isEmpty()) {

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/ClusterResource.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/ClusterResource.java?rev=1189517&r1=1189516&r2=1189517&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/ClusterResource.java (original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/ClusterResource.java Wed Oct 26 22:51:30 2011
@@ -35,7 +35,7 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.ResponseBuilder;
 
 
-import org.apache.ambari.common.rest.entities.Blueprint;
+import org.apache.ambari.common.rest.entities.Stack;
 import org.apache.ambari.common.rest.entities.ClusterDefinition;
 import org.apache.ambari.common.rest.entities.ClusterInformation;
 import org.apache.ambari.common.rest.entities.Node;
@@ -108,7 +108,7 @@ public class ClusterResource {
      *                                          http header describing specific error condition).
      * @response.representation.200.example
      * 
-     * @param   clusterName                     Name of the cluster
+     * @param   clusterName                     Name of the cluster ZZZZZZZ
      * @param   dry_run                         Whether to do a dry run
      * @param   cluster                         Cluster definition to be created new or updated existing one
      *                                          Cluster name can not be updated through this API.
@@ -291,18 +291,18 @@ public class ClusterResource {
      *                      unique name
      *  @param  expanded    Optionally specify the boolean value to indicate if 
      *                      to retrieved the cluster level blueprint or the fully
-     *                      derived blueprint in-lining the parent blueprints 
+     *                      derived blueprint in-lining the parent stacks 
      *                      associated with the service role
-     *  @return             Blueprint
+     *  @return             Stack
      *  @throws Exception   throws Exception
      */
     @Path(value = "/blueprint")
     @GET
     @Produces({"application/json", "application/xml"})
-    public Blueprint getClusterBlueprint (@PathParam("clusterName") String clusterName,
+    public Stack getClusterStack (@PathParam("clusterName") String clusterName,
                                 @DefaultValue("true") @QueryParam("expanded") boolean expanded) throws Exception {    
         try {
-            return Clusters.getInstance().getClusterBlueprint(clusterName, expanded);
+            return Clusters.getInstance().getClusterStack(clusterName, expanded);
         }catch (WebApplicationException we) {
             throw we;
         }catch (Exception e) {



Mime
View raw message