ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Speidel" <jspei...@hortonworks.com>
Subject Re: Review Request 18363: Add ability to export a blueprint for a running cluster
Date Mon, 24 Feb 2014 17:16:58 GMT


> On Feb. 24, 2014, 4:04 p.m., Nate Cole wrote:
> > Is this an internal-only feature?  It seems the caller would need to know what renderings
are available for the resource in question.
> 
> John Speidel wrote:
>     Thanks Nate for the review. 
>     This will be exposed to users, initially for exporting a blueprint for a running
cluster (api/v1/clusters/c1?format=blueprint).  Also, this new syntax could be used to obtain
a minimal response (myResource?format=minimal) even though the old syntax still works (minimal_response=true).
>     Agreed on your concern about users knowing which renderers are available for a given
resource.  The API will need to be augmented to provide this information for each resource.
 Obtaining this information is easy as it is in the resource definition, we just need to decide
how to expose it via the api.  Also, docs will need to be updated.

Forgot to mention, the user will not need to know which renderers are available unless he
desires an alternate rendering for a resource as the default rendering doesn't require a renderer
to be specified.  With this patch there will be 3 renderers, default (current behavior for
all resources), minimal (current minimal_response=true for all resources) and blueprint which
is specific to the cluster resource.


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18363/#review35282
-----------------------------------------------------------


On Feb. 21, 2014, 6:26 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18363/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2014, 6:26 p.m.)
> 
> 
> Review request for Ambari, Mahadev Konar, Nate Cole, Sumit Mohanty, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-4786
>     https://issues.apache.org/jira/browse/AMBARI-4786
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Export a blueprint for a running cluster using an alternate rendering for the cluster
resource.
> This patch also provides the functionality for providing alternate renderings, such as
blueprint for cluster resources.
> Also, the minimal_response=true syntax can now be specified using an alternate rendering
format=minimal for any resource.
> 
> For this change, the blueprint will be very minimal and will only contain node groups
and no configuration. Subsequent patches will introduce configuration and other cluster data.
> 
> 
> GET api/v1/clusters/c1?format=blueprint
> 
> 
> {
>   "host_groups" : [
>     {
>       "name" : "host_group_1",
>       "components" : [
>         {
>           "name" : "HISTORYSERVER"
>         },
>         {
>           "name" : "OOZIE_CLIENT"
>         },
>         {
>           "name" : "JOBTRACKER"
>         },
>         {
>           "name" : "NAMENODE"
>         },
>         {
>           "name" : "OOZIE_SERVER"
>         },
>         {
>           "name" : "TASKTRACKER"
>         },
>         {
>           "name" : "NAGIOS_SERVER"
>         },
>         {
>           "name" : "SECONDARY_NAMENODE"
>         },
>         {
>           "name" : "MAPREDUCE_CLIENT"
>         },
>         {
>           "name" : "AMBARI_SERVER"
>         },
>         {
>           "name" : "GANGLIA_SERVER"
>         },
>         {
>           "name" : "HDFS_CLIENT"
>         },
>         {
>           "name" : "DATANODE"
>         },
>         {
>           "name" : "GANGLIA_MONITOR"
>         }
>       ],
>       "cardinality" : "1"
>     }
>   ],
>   "Blueprints" : {
>     "blueprint_name" : "blueprint-c1",
>     "stack_name" : "HDP",
>     "stack_version" : "1.3.3"
>   }
> }
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/handlers/BaseManagementHandler.java
a31a46e 
>   ambari-server/src/main/java/org/apache/ambari/server/api/handlers/ReadHandler.java
3b4cda1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/handlers/RequestHandler.java
381dedb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
5aa04c4 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/Query.java 58c947a 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java a7ac498

>   ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryInfo.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/api/query/render/BaseRenderer.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/render/DefaultRenderer.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MinimalRenderer.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/render/Renderer.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java
85ca8e5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
4b0e8e1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceDefinition.java
ba69869 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseRequest.java
ed7bc45 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
8bf7836 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/Request.java f2de36e

>   ambari-server/src/main/java/org/apache/ambari/server/api/services/ResultPostProcessorImpl.java
c02e0a2 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/JsonSerializer.java
15b2f47 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/ResultSerializer.java
22b8c88 
>   ambari-server/src/main/java/org/apache/ambari/server/api/util/TreeNode.java ffb41fa

>   ambari-server/src/main/java/org/apache/ambari/server/api/util/TreeNodeImpl.java da7ead4

>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ClusterController.java
c50ff7e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/SchemaFactory.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/handlers/CreateHandlerTest.java
22356f0 
>   ambari-server/src/test/java/org/apache/ambari/server/api/handlers/DeleteHandlerTest.java
ac84348 
>   ambari-server/src/test/java/org/apache/ambari/server/api/handlers/ReadHandlerTest.java
f1d2ea6 
>   ambari-server/src/test/java/org/apache/ambari/server/api/handlers/UpdateHandlerTest.java
161a61d 
>   ambari-server/src/test/java/org/apache/ambari/server/api/predicate/QueryLexerTest.java
4cffb3b 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 12160ff

>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryInfoTest.java PRE-CREATION

>   ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/render/DefaultRendererTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/render/MinimalRendererTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/BaseResourceDefinitionTest.java
152a30b 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ClusterResourceDefinitionTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/BaseRequestTest.java
9a68ec4 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/BaseServiceTest.java
8217b9c 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/JsonSerializerTest.java
63eb33a 
> 
> Diff: https://reviews.apache.org/r/18363/diff/
> 
> 
> Testing
> -------
> 
> - all unit tests pass
> - many new unit tests added
> - functional testing of all types of api calls and deployment of cluster via UI
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message