You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by hi...@apache.org on 2012/10/03 01:42:01 UTC

svn commit: r1393239 - in /incubator/ambari/branches/AMBARI-666: ./ ambari-project/ ambari-server/ ambari-server/src/main/java/org/apache/ambari/server/controller/

Author: hitesh
Date: Tue Oct  2 23:42:00 2012
New Revision: 1393239

URL: http://svn.apache.org/viewvc?rev=1393239&view=rev
Log:
AMBARI-789. Prototype for management spi interface. (Contributed by hitesh)

Added:
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationRequest.java   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationResponse.java   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentRequest.java   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentResponse.java   (with props)
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java   (with props)
Removed:
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/JobRequest.java
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/Request.java
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigurationRequest.java
Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-project/pom.xml
    incubator/ambari/branches/AMBARI-666/ambari-server/pom.xml
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1393239&r1=1393238&r2=1393239&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Tue Oct  2 23:42:00 2012
@@ -12,6 +12,8 @@ AMBARI-666 branch (unreleased changes)
 
   NEW FEATURES
 
+  AMBARI-789. Prototype for management spi interface. (hitesh)
+
   AMBARI-787. Registration throws HostNotFoundException for new hosts. (jitendra)
 
   AMBARI-788. Fix server and agent startup for end to end testing. (mahadev)

Modified: incubator/ambari/branches/AMBARI-666/ambari-project/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-project/pom.xml?rev=1393239&r1=1393238&r2=1393239&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-project/pom.xml (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-project/pom.xml Tue Oct  2 23:42:00 2012
@@ -85,6 +85,11 @@
   <dependencyManagement>
     <dependencies>
       <dependency>
+        <groupId>org.apache.ambari</groupId>
+        <artifactId>ambari-api</artifactId>
+        <version>1.0.3-SNAPSHOT</version>
+      </dependency>
+      <dependency>
         <groupId>commons-io</groupId>
         <artifactId>commons-io</artifactId>
         <version>2.1</version>

Modified: incubator/ambari/branches/AMBARI-666/ambari-server/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/pom.xml?rev=1393239&r1=1393238&r2=1393239&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/pom.xml (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/pom.xml Tue Oct  2 23:42:00 2012
@@ -57,6 +57,10 @@
   </profiles>
   <dependencies>
     <dependency>
+      <groupId>org.apache.ambari</groupId>
+      <artifactId>ambari-api</artifactId>
+    </dependency>
+    <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
     </dependency>

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java?rev=1393239&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java Tue Oct  2 23:42:00 2012
@@ -0,0 +1,83 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.controller;
+
+import java.util.Set;
+
+import org.apache.ambari.api.controller.spi.Predicate;
+
+/**
+ * Management controller interface.
+ */
+public interface AmbariManagementController {
+
+
+  // ----- Create -----------------------------------------------------------
+
+  public ClusterResponse createCluster(ClusterRequest request);
+
+  public ServiceResponse createServices(ServiceRequest request);
+
+  public ServiceComponentResponse createComponents(ServiceComponentRequest request);
+
+  public HostResponse createHosts(HostRequest request);
+
+  public ServiceComponentHostResponse createHostComponents(ServiceComponentHostRequest request);
+
+
+  // ----- Read -------------------------------------------------------------
+
+  public ClusterResponse getCluster(ClusterRequest request);
+  public Set<ClusterResponse> getAllClusters();
+
+  public ServiceResponse getServices(ServiceRequest request, Predicate predicate);
+
+  public ServiceComponentResponse getComponents(ServiceComponentRequest request, Predicate predicate);
+
+  public HostResponse getHosts(HostRequest request, Predicate predicate);
+
+  public ServiceComponentHostResponse getHostComponents(ServiceComponentHostRequest request, Predicate predicate);
+
+
+  // ----- Update -----------------------------------------------------------
+
+  public ClusterResponse updateCluster(ClusterRequest request);
+
+  public ServiceResponse updateServices(ServiceRequest request, Predicate predicate);
+
+  public ServiceComponentResponse updateComponents(ServiceComponentRequest request, Predicate predicate);
+
+  public HostResponse updateHosts(HostRequest request, Predicate predicate);
+
+  public ServiceComponentHostResponse updateHostComponents(ServiceComponentHostRequest request, Predicate predicate);
+
+
+  // ----- Delete -----------------------------------------------------------
+
+  public void deleteCluster(ClusterRequest request);
+
+  public void deleteServices(ServiceRequest request);
+
+  public void deleteComponents(ServiceComponentRequest request);
+
+  public void deleteHosts(HostRequest request);
+
+
+  public void deleteHostComponents(ServiceComponentHostRequest request);
+}

Propchange: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java?rev=1393239&r1=1393238&r2=1393239&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java Tue Oct  2 23:42:00 2012
@@ -15,16 +15,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.ambari.server.controller;
 
 /**
- * This class encapsulates a cluster level request.
+ * Used for create Cluster
  */
-public class ClusterRequest extends Request {
-  private String clusterName;
+public class ClusterRequest {
 
-  public ClusterRequest(long requestId, Request.Method m, String c) {
-    super(requestId, m);
-    this.clusterName = c;
-  }
+  Long clusterId; // for GET
+  
+  String clusterName; // for GET/CREATE/UPDATE
+  
+  String stackVersion; // for CREATE/UPDATE
 }

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java?rev=1393239&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java Tue Oct  2 23:42:00 2012
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.controller;
+
+import java.util.Map;
+
+/**
+ * Used for create Cluster
+ */
+public class ClusterResponse {
+
+  Long clusterId; // for GET
+  
+  String clusterName; // for GET/CREATE/UPDATE
+  
+  Map<String, ServiceResponse> services; // for GET
+  
+  Map<String, HostResponse> hosts; // for GET
+}
\ No newline at end of file

Propchange: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationRequest.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationRequest.java?rev=1393239&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationRequest.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationRequest.java Tue Oct  2 23:42:00 2012
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.controller;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This class encapsulates a configuration update request.
+ * The configuration properties are grouped at service level. It is assumed that
+ * different components of a service don't overload same property name.
+ */
+public class ConfigurationRequest {
+
+  String clusterName;
+  
+  List<PerConfigurationRequest> configs;
+  
+  public static class PerConfigurationRequest {
+    
+    String type;
+    
+    String versionTag;
+    
+    Map<String, String> configs;
+  }
+
+}

Propchange: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationRequest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationResponse.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationResponse.java?rev=1393239&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationResponse.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationResponse.java Tue Oct  2 23:42:00 2012
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.controller;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This class encapsulates a configuration update request.
+ * The configuration properties are grouped at service level. It is assumed that
+ * different components of a service don't overload same property name.
+ */
+public class ConfigurationResponse {
+
+  String clusterName;
+  
+  List<PerConfigurationResponse> configs;
+  
+  public static class PerConfigurationResponse {
+    
+    String type;
+    
+    String versionTag;
+    
+    Map<String, String> configs;
+  }
+
+}

Propchange: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigurationResponse.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java?rev=1393239&r1=1393238&r2=1393239&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java Tue Oct  2 23:42:00 2012
@@ -15,21 +15,21 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.ambari.server.controller;
 
 import java.util.List;
 import java.util.Map;
 
-/**
- * This class encapsulates any request at a host level but not referring to any
- * service or component.
- */
-public class HostRequest extends Request {
-  private List<String> hosts;
+public class HostRequest {
 
-  public HostRequest(long requestId, Request.Method m, List<String> hostList,
-      Map<String, String> params) {
-    super(requestId, m, params);
-    hosts = hostList;
+  List<PerHostRequest> hosts;
+  
+  public static class PerHostRequest {
+    String hostname;
+    
+    List<String> clusterNames; // CREATE/UPDATE 
+    
+    Map<String, String> hostAttributes; // CREATE/UPDATE  
   }
 }

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java?rev=1393239&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java Tue Oct  2 23:42:00 2012
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.controller;
+
+import java.util.List;
+import java.util.Map;
+
+public class HostResponse {
+
+  List<PerHostResponse> hosts;
+  
+  public static class PerHostResponse {
+    String hostname;
+    
+    List<String> clusterNames;
+    
+    Map<String, String> hostAttributes; 
+    
+    List<ServiceComponentHostResponse> hostComponents;
+  }
+}

Propchange: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java?rev=1393239&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java Tue Oct  2 23:42:00 2012
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.controller;
+
+import java.util.List;
+import java.util.Map;
+
+public class ServiceComponentHostRequest {
+
+  String clusterName; // REF
+  
+  List<PerServiceComponentHostRequest> hostComponents;
+  
+  public static class PerServiceComponentHostRequest {
+    
+    String serviceName; 
+    
+    String componentName;
+    
+    String hostname;
+    
+    // Config type -> version mapping
+    Map<String, String> configVersions; // CREATE/UPDATE
+    
+    String desiredState; // CREATE/UPDATE
+
+  }
+
+}

Propchange: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java?rev=1393239&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java Tue Oct  2 23:42:00 2012
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.controller;
+
+import java.util.List;
+import java.util.Map;
+
+public class ServiceComponentHostResponse {
+
+  String clusterName; // REF
+  
+  List<PerServiceComponentHostResponse> hostComponents;
+  
+  public static class PerServiceComponentHostResponse {
+    
+    String serviceName; 
+    
+    String componentName;
+    
+    String hostname;
+    
+    // Config type -> version mapping
+    Map<String, String> configVersions;
+
+    String liveState;
+
+    String stackVersion;
+
+  }
+
+}

Propchange: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentRequest.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentRequest.java?rev=1393239&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentRequest.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentRequest.java Tue Oct  2 23:42:00 2012
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.controller;
+
+import java.util.List;
+import java.util.Map;
+
+public class ServiceComponentRequest {
+
+  String clusterName; // REF
+  
+  List<PerServiceComponentRequest> components;
+
+  public static class PerServiceComponentRequest {
+
+    String serviceName; // GET/CREATE/UPDATE/DELETE
+    
+    String componentName; // GET/CREATE/UPDATE/DELETE
+        
+    // Config type -> version mapping
+    Map<String, String> configVersions; // CREATE/UPDATE
+    
+    String desiredState; // CREATE/UPDATE
+    
+  }
+
+}

Propchange: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentRequest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentResponse.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentResponse.java?rev=1393239&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentResponse.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentResponse.java Tue Oct  2 23:42:00 2012
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.controller;
+
+import java.util.List;
+import java.util.Map;
+
+public class ServiceComponentResponse {
+
+  Long clusterId; // REF
+
+  String clusterName; // REF
+  
+  List<PerServiceComponentResponse> components;
+
+  public static class PerServiceComponentResponse {
+
+    String serviceName; // GET/CREATE/UPDATE/DELETE
+    
+    String componentName; // GET/CREATE/UPDATE/DELETE
+        
+    // Config type -> version mapping
+    Map<String, String> configVersions; // CREATE/UPDATE
+    
+    // hostname -> ServiceComponentHost mapping
+    Map<String, ServiceComponentHostResponse> serviceComponentHosts;
+    
+  }
+
+}

Propchange: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentResponse.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java?rev=1393239&r1=1393238&r2=1393239&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java Tue Oct  2 23:42:00 2012
@@ -17,38 +17,24 @@
  */
 package org.apache.ambari.server.controller;
 
-import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-/**
- * This class encapsulates any request relating to a state change or action in
- * a service or its components.
- */
-public class ServiceRequest extends Request {
-  private String clusterName;
-  private String service;
-  private String configVersion;
-  private String hostComponentMapVersion;
-
-  public class ComponentRequest {
-    private String componentName;
-    private Map<String, String> params = new HashMap<String, String>();
-  }
+public class ServiceRequest {
 
-  public void addComponentRequest(ComponentRequest c) {
-    components.add(c);
-  }
+  String clusterName; // REF
 
-  public ServiceRequest(long requestId, Request.Method m, String clusterName,
-      String service, String configVersion, String hostComponentMapVersion) {
-    super(requestId, m);
-    this.clusterName = clusterName;
-    this.service = service;
-    this.configVersion = configVersion;
-    this.hostComponentMapVersion = hostComponentMapVersion;
-  }
+  List<PerServiceRequest> services;
+
+  public static class PerServiceRequest {
 
-  private List<ComponentRequest> components = new ArrayList<ComponentRequest>();
+    String serviceName; // GET/CREATE/UPDATE/DELETE
+    
+    // Config type -> version mapping
+    Map<String, String> configVersions; // CREATE/UPDATE
+    
+    String desiredState; // CREATE/UPDATE
+    
+  }
+  
 }

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java?rev=1393239&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java Tue Oct  2 23:42:00 2012
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.controller;
+
+import java.util.List;
+import java.util.Map;
+
+public class ServiceResponse {
+
+  Long clusterId; // REF
+
+  String clusterName; // REF
+
+  List<PerServiceResponse> services;
+  
+  public static class PerServiceResponse {
+    
+    String serviceName;
+    
+    String currentStackVersion;
+    
+    Map<String, ServiceComponentResponse> components;
+    
+  }
+}

Propchange: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java
------------------------------------------------------------------------------
    svn:eol-style = native