incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1176582 - in /incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components: ClusterContext.java ComponentPlugin.java
Date Tue, 27 Sep 2011 20:06:45 GMT
Author: omalley
Date: Tue Sep 27 20:06:44 2011
New Revision: 1176582

URL: http://svn.apache.org/viewvc?rev=1176582&view=rev
Log:
AMBARI-4. Created interface for component plugins. (omalley)

Modified:
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components/ClusterContext.java
    incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components/ComponentPlugin.java

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components/ClusterContext.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components/ClusterContext.java?rev=1176582&r1=1176581&r2=1176582&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components/ClusterContext.java
(original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components/ClusterContext.java
Tue Sep 27 20:06:44 2011
@@ -37,13 +37,6 @@ public interface ClusterContext {
   String[] getAllRoles();
   
   /**
-   * Get the list of all roles for this component that should be started 
-   * running on this node.
-   * @return the lists of roles that should be running
-   */
-  String[] getActiveRoles();
-  
-  /**
    * Get the directory name for the directory that should contain the software.
    * @return the full pathname of the directory
    */

Modified: incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components/ComponentPlugin.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components/ComponentPlugin.java?rev=1176582&r1=1176581&r2=1176582&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components/ComponentPlugin.java
(original)
+++ incubator/ambari/trunk/controller/src/main/java/org/apache/ambari/components/ComponentPlugin.java
Tue Sep 27 20:06:44 2011
@@ -20,7 +20,7 @@ package org.apache.ambari.components;
 import java.io.IOException;
 import java.util.List;
 
-import org.apache.ambari.common.rest.entities.agent.Command;
+import org.apache.ambari.common.rest.entities.agent.Action;
 
 /**
  * A plug in that defines how to manage each component.
@@ -57,8 +57,8 @@ public abstract class ComponentPlugin {
    * @return the list of commands to run on each node
    * @throws IOException
    */
-  public abstract List<Command> writeConfiguration(ClusterContext cluster
-                                                   ) throws IOException;
+  public abstract List<Action> writeConfiguration(ClusterContext cluster
+                                                  ) throws IOException;
   
   /**
    * Get the commands to finalize the installation on the machine.
@@ -66,24 +66,37 @@ public abstract class ComponentPlugin {
    * @return the list of commands to execute
    * @throws IOException
    */
-  public abstract List<Command> install(ClusterContext cluster
-                                        ) throws IOException;
+  public abstract List<Action> install(ClusterContext cluster
+                                       ) throws IOException;
   
   /**
-   * Get the commands start and stop the servers on this node.
+   * Get the commands to start a role's server.
    * @param cluster the cluster that is being installed
+   * @param role the role that needs to start running its server
    * @return the list of commands to execute
    * @throws IOException
    */
-  public abstract List<Command> startStopServices(ClusterContext cluster
-                                                  ) throws IOException;
-  
+  public abstract List<Action> startRoleServer(ClusterContext cluster,
+                                               String role
+                                               ) throws IOException;
+
+  /**
+   * Get the commands to stop a role's server.
+   * @param cluster the cluster that is being installed
+   * @param role the role that needs to stop running its server
+   * @return the list of commands to execute
+   * @throws IOException
+   */
+  public abstract List<Action> stopRoleServer(ClusterContext cluster,
+                                              String role
+                                              ) throws IOException;
+
   /**
    * Get the commands to run before the software is uninstalled.
    * @param cluster the cluster that is being uninstalled
    * @return the list of commands to execute
    * @throws IOException
    */
-  public abstract List<Command> uninstall(ClusterContext cluster
-                                          ) throws IOException;
+  public abstract List<Action> uninstall(ClusterContext cluster
+                                         ) throws IOException;
 }



Mime
View raw message