Browse Source

AMBARI-750. Fix build compilation issue. (mahadev)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/AMBARI-666@1387043 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 12 years ago
parent
commit
f61fa33f2d

+ 2 - 0
AMBARI-666-CHANGES.txt

@@ -132,6 +132,8 @@ AMBARI-666 branch (unreleased changes)
 
   BUG FIXES
 
+  AMBARI-750. Fix build compilation issue. (mahadev)
+
   AMBARI-718. Fix installer navigation. (yusaku)
 
   AMBARI-684. Remove non-required dependencies from pom files (hitesh via jitendra)

+ 4 - 3
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java

@@ -21,6 +21,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.Role;
 import org.apache.ambari.server.agent.ActionQueue;
 import org.apache.ambari.server.agent.ExecutionCommand;
@@ -82,7 +83,7 @@ class ActionScheduler implements Runnable {
     }
   }
   
-  private void doWork() {
+  private void doWork() throws AmbariException {
     List<Stage> stages = db.getPendingStages();
     if (stages == null || stages.isEmpty()) {
       //Nothing to do
@@ -119,7 +120,7 @@ class ActionScheduler implements Runnable {
   }
 
   private void processPendingsAndReschedule(Stage stage,
-      Map<String, HostRoleCommand> hrcMap) {
+      Map<String, HostRoleCommand> hrcMap) throws AmbariException {
     for (String host : hrcMap.keySet()) {
       HostRoleCommand hrc = hrcMap.get(host);
       if ( (hrc.getStatus() != HostRoleStatus.PENDING) &&
@@ -153,7 +154,7 @@ class ActionScheduler implements Runnable {
     }
   }
 
-  private void scheduleHostRole(Stage s, HostRoleCommand hrc) {
+  private void scheduleHostRole(Stage s, HostRoleCommand hrc) throws AmbariException {
     LOG.info("Host:"+hrc.getHostName()+", role:"+hrc.getRole()+", actionId:"+s.getActionId()+" being scheduled");
     long now = System.currentTimeMillis();
     if (hrc.getStartTime() < 0) {