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/10 02:06:46 UTC

svn commit: r1396426 - in /incubator/ambari/branches/AMBARI-666: AMBARI-666-CHANGES.txt ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java

Author: hitesh
Date: Wed Oct 10 00:06:46 2012
New Revision: 1396426

URL: http://svn.apache.org/viewvc?rev=1396426&view=rev
Log:
AMBARI-839. Temporary fix for server start order. (Contributed by hitesh)

Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.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=1396426&r1=1396425&r2=1396426&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Wed Oct 10 00:06:46 2012
@@ -227,6 +227,8 @@ AMBARI-666 branch (unreleased changes)
 
   BUG FIXES
 
+  AMBARI-839. Temporary fix for server start order. (hitesh)
+
   AMBARI-837. Fix basic injection issues for controller impl. (hitesh)
 
   AMBARI-836. Fix generation of requestId to be unique across restarts. (hitesh)

Modified: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java?rev=1396426&r1=1396425&r2=1396426&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java Wed Oct 10 00:06:46 2012
@@ -187,22 +187,30 @@ public class AmbariServer {
       server.setStopAtShutdown(true);
       serverForAgent.setStopAtShutdown(true);
       springAppContext.start();
-      /*
-       * Start the server after controller state is recovered.
-       */
-      server.start();
-      serverForAgent.start();
 
       //Start action scheduler
       LOG.info("********* Initializing Clusters **********");
       Clusters clusters = injector.getInstance(Clusters.class);
-      LOG.info("********* Started Server **********");
+      LOG.info("********* Initializing ActionManager **********");
       ActionManager manager = injector.getInstance(ActionManager.class);
-      manager.start();
       LOG.info("********* Initializing Controller **********");
       AmbariManagementController controller = injector.getInstance(
           AmbariManagementController.class);
 
+
+      // FIXME need to figure out correct order of starting things to
+      // handle restart-recovery correctly
+
+      /*
+       * Start the server after controller state is recovered.
+       */
+      server.start();
+      serverForAgent.start();
+      LOG.info("********* Started Server **********");
+
+      manager.start();
+      LOG.info("********* Started ActionManager **********");
+
       server.join();
       LOG.info("Joined the Server");
     } catch (Exception e) {