Return-Path: X-Original-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4823A9F3C for ; Tue, 25 Oct 2011 21:25:22 +0000 (UTC) Received: (qmail 29805 invoked by uid 500); 25 Oct 2011 21:25:22 -0000 Delivered-To: apmail-incubator-ambari-commits-archive@incubator.apache.org Received: (qmail 29791 invoked by uid 500); 25 Oct 2011 21:25:22 -0000 Mailing-List: contact ambari-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-commits@incubator.apache.org Received: (qmail 29779 invoked by uid 99); 25 Oct 2011 21:25:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 21:25:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 21:25:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6988623888FE; Tue, 25 Oct 2011 21:24:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1188927 - in /incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources: BlueprintResource.java ClusterResource.java ClustersResource.java Date: Tue, 25 Oct 2011 21:24:56 -0000 To: ambari-commits@incubator.apache.org From: vgogate@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111025212456.6988623888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: vgogate Date: Tue Oct 25 21:24:55 2011 New Revision: 1188927 URL: http://svn.apache.org/viewvc?rev=1188927&view=rev Log: AMBARI-101 Modified: 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/ClusterResource.java incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/ClustersResource.java 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=1188927&r1=1188926&r2=1188927&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 Tue Oct 25 21:24:55 2011 @@ -50,76 +50,6 @@ public class BlueprintResource { * @response.representation.200.doc Get a blueprint * @response.representation.200.mediaType application/json * @response.representation.200.example - { - "@name":"cluster123", - "@revision":"0", - "@parentName":"hadoop-security", - "@parentRevision":"0", - "@creationTime":"2011-10-24T12:13:44.774-07:00", - "configuration":{ - "category":[ - { - "@name":"ambari", - "@permission":"0", - "property":[ - { - "@name":"data.dirs", - "@value":"/grid/*", - "@force":"false" - }, - { - "@name":"hdfs.user", - "@value":"hrt_hdfs", - "@force":"false" - }, - { - "@name":"mapreduce.user", - "@value":"hrt_mapred", - "@force":"false" - }, - { - "@name":"hbase.user", - "@value":"hrt_hbase", - "@force":"false" - }, - { - "@name":"hcat.user", - "@value":"hrt_hcat", - "@force":"false" - }, - { - "@name":"user.realm", - "@value":"HORTON.YGRIDCORE.NET", - "@force":"false" - } - ] - }, - { - "@name":"hadoop-env", - "@permission":"0", - "property":{ - "@name":"HADOOP_CLIENT_OPTS", - "@value":"-Xmx256m ${HADOOP_CLIENT_OPTS}", - "@force":"false" - } - } - ] - }, - "components":{ - "@name":"hdfs", - "configuration":{ - "category":{ - "@name":"hadoop-env", - "@permission":"0", - "property":{ - "@name":"HADOOP_NAMENODE_OPTS", - "@value":"-Xmx512m -Dsecurity.audit.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_NAMENODE_OPTS}", - "@force":"false" - } - } - } - } - } * * @param blueprintName Name of the blueprint * @param revision The optional blueprint revision, if not specified get the latest revision 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=1188927&r1=1188926&r2=1188927&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 Tue Oct 25 21:24:55 2011 @@ -59,40 +59,7 @@ public class ClusterResource { * @response.representation.200.doc Get the definition & current state of the specified Hadoop cluster * @response.representation.200.mediaType application/json * @response.representation.404.doc Specified cluster does not exist - * @response.representation.200.example ClusterInformation {@link http://www.apple.com/} - { - "definition":{ - "@name":"blue.dev.Cluster123", - "@description":"cluster123 - development cluster", - "@blueprintName":"cluster123-blueprint", - "@blueprintRevision":"0", - "@goalState":"ATTIC", - "@nodes":"jt-nodex,nn-nodex,hostname-1x,hostname-2x,hostname-3x,hostname-4x,node-2x,node-3x,node-4x", - "activeServices":[ - "hdfs", - "mapred" - ], - "roleToNodesMap":[ - { - "@roleName":"jobtracker-role", - "@nodes":"jt-nodex" - }, - { - "@roleName":"namenode-role", - "@nodes":"nn-nodex" - }, - { - "@roleName":"slaves-role", - "@nodes":"hostname-1x,hostname-2x,hostname-3x,hostname-4x,node-2x,node-3x,node-4x" - } - ] - }, - "state":{ - "@state":"ATTIC", - "@creationTime":"2011-10-20T11:35:06.687-07:00", - "@lastUpdateTime":"2011-10-20T11:35:06.687-07:00" - } - } + * @response.representation.200.example ClusterInformation * * @param clusterName Name of the cluster; Each cluster is identified w/ unique name * @return Returns the Cluster Information @@ -118,35 +85,7 @@ public class ClusterResource { * @response.representation.400.doc Bad request (See "ErrorMessage" in the response * http header describing specific error condition). * @response.representation.404.doc Cluster does not exist - * @response.representation.200.example - { - "definition":{ - "@name":"blue.dev.Cluster123", - "@description":"cluster123 - development cluster", - "@blueprintName":"cluster123-blueprint", - "@blueprintRevision":"0", - "@goalState":"ATTIC", - "@nodes":"jt-nodex,nn-nodex,hostname-1x,hostname-2x,hostname-3x,hostname-4x,node-2x,node-3x,node-4x", - "activeServices":[ - "hdfs", - "mapred" - ], - "roleToNodesMap":[ - { - "@roleName":"jobtracker-role", - "@nodes":"jt-nodex" - }, - { - "@roleName":"namenode-role", - "@nodes":"nn-nodex" - }, - { - "@roleName":"slaves-role", - "@nodes":"hostname-1x,hostname-2x,hostname-3x,hostname-4x,node-2x,node-3x,node-4x" - } - ] - } - } + * @response.representation.200.example * * @param clusterName Name of the cluster; Each cluster is identified w/ unique name * @param cluster Cluster definition with only specific sub-elements to be updated. @@ -284,41 +223,6 @@ public class ClusterResource { * @response.representation.500.doc Internal Server Error; No nodes are associated with the cluster * (See "ErrorMessage" in the response http header describing specific error condition). * @response.representation.200.example - { - "Nodes":[ - { - "@name":"jt-node", - "NodeState":{ - "clusterID":"b70c764c-5970-42c0-9540-bf7df3600de4", - "allocatedToCluster":"true", - "lastHeartbeatTime":"1969-12-31T16:00:00.000-08:00", - "agentInstalled":"true", - "nodeRoleNames":"mapred.jobtracker" - } - }, - { - "@name":"nn-node", - "NodeState":{ - "clusterID":"b70c764c-5970-42c0-9540-bf7df3600de4", - "allocatedToCluster":"true", - "lastHeartbeatTime":"1969-12-31T16:00:00.000-08:00", - "agentInstalled":"true", - "nodeRoleNames":"hdfs.namenode" - } - }, - { - "@name":"hostname-1", - "NodeState":{ - "clusterID":"b70c764c-5970-42c0-9540-bf7df3600de4", - "allocatedToCluster":"true", - "lastHeartbeatTime":"1969-12-31T16:00:00.000-08:00", - "agentInstalled":"true", - "nodeRoleNames":"hdfs.datanode, mapred.tasktracker" - } - } - - ] - } * * @param clusterName Name of the cluster; Each cluster is identified w/ * unique name @@ -360,76 +264,6 @@ public class ClusterResource { * @response.representgation.404.doc Cluster does not exist * * @response.representation.200.example - { - "@name":"cluster123", - "@revision":"0", - "@parentName":"hadoop-security", - "@parentRevision":"0", - "@creationTime":"2011-10-24T12:13:44.774-07:00", - "configuration":{ - "category":[ - { - "@name":"ambari", - "@permission":"0", - "property":[ - { - "@name":"data.dirs", - "@value":"/grid/*", - "@force":"false" - }, - { - "@name":"hdfs.user", - "@value":"hrt_hdfs", - "@force":"false" - }, - { - "@name":"mapreduce.user", - "@value":"hrt_mapred", - "@force":"false" - }, - { - "@name":"hbase.user", - "@value":"hrt_hbase", - "@force":"false" - }, - { - "@name":"hcat.user", - "@value":"hrt_hcat", - "@force":"false" - }, - { - "@name":"user.realm", - "@value":"HORTON.YGRIDCORE.NET", - "@force":"false" - } - ] - }, - { - "@name":"hadoop-env", - "@permission":"0", - "property":{ - "@name":"HADOOP_CLIENT_OPTS", - "@value":"-Xmx256m ${HADOOP_CLIENT_OPTS}", - "@force":"false" - } - } - ] - }, - "components":{ - "@name":"hdfs", - "configuration":{ - "category":{ - "@name":"hadoop-env", - "@permission":"0", - "property":{ - "@name":"HADOOP_NAMENODE_OPTS", - "@value":"-Xmx512m -Dsecurity.audit.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_NAMENODE_OPTS}", - "@force":"false" - } - } - } - } - } * * @param clusterName Name of the cluster; Each cluster is identified w/ * unique name Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/ClustersResource.java URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/ClustersResource.java?rev=1188927&r1=1188926&r2=1188927&view=diff ============================================================================== --- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/ClustersResource.java (original) +++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/controller/rest/resources/ClustersResource.java Tue Oct 25 21:24:55 2011 @@ -51,29 +51,7 @@ public class ClustersResource { * "INACTIVE" : All the inactive state clusters * "ATTIC" : All the retired i.e. ATTIC state clusters * @response.representation.200.doc Return ClusterInformation - * @response.representation.200.example {"ClusterInformation":[ - * { - * "definition": { - * "@name":"blue.dev.Cluster123", - * "@description":"cluster123 - development cluster", - * "@blueprintName":"cluster123", - * "@blueprintRevision":"0", - * "@goalState":"ATTIC", - * "@nodes":"jt-nodex,nn-nodex,hostname-1x,hostname-2x", - * "activeServices":["hdfs","mapred"], - * "roleToNodesMap":[ - * {"@roleName":"jobtracker-role","@nodes":"jt-nodex"}, - * {"@roleName":"namenode-role","@nodes":"nn-nodex"}, - * {"@roleName":"slaves-role","@nodes":"hostname-1x,hostname-2x"} - * ] - * }, - * "state":{ - * "@state":"ATTIC", - * "@creationTime":"2011-10-24T09:33:42.151-07:00", - * "@lastUpdateTime":"2011-10-24T09:33:42.151-07:00" - * } - * } - * ]} + * @response.representation.200.example * @response.representation.204.doc No cluster defined * @response.representation.500.doc Internal Server Error * @param state The state of the cluster @@ -125,20 +103,7 @@ public class ClustersResource { * etc. * * @request.representation.doc ClusterDefinition object - * @request.representation.example { - * "@name":"blue.dev.Cluster123", - * "@description":"cluster123 - development cluster", - * "@blueprintName":"cluster123", - * "@blueprintRevision":"0", - * "@goalState":"ATTIC", - * "@nodes":"jt-nodex,nn-nodex,hostname-1x,hostname-2x", - * "activeServices":["hdfs","mapred"], - * "roleToNodesMap":[ - * {"@roleName":"jobtracker-role","@nodes":"jt-nodex"}, - * {"@roleName":"namenode-role","@nodes":"nn-nodex"}, - * {"@roleName":"slaves-role","@nodes":"hostname-1x,hostname-2x"} - * ] - * } + * @request.representation.example * * @param dry_run Enable dry run by setting it to true * @param cluster Definition of the cluster to be created