You are viewing a plain text version of this content. The canonical link for it is here.
Posted to s4-commits@incubator.apache.org by mm...@apache.org on 2012/01/21 15:07:20 UTC

[2/4] git commit: S4-24 handle interrupt in initial application deployment - by logging an error and canceling deployment of new applications

S4-24 handle interrupt in initial application deployment
- by logging an error and canceling deployment of new applications

Project: http://git-wip-us.apache.org/repos/asf/incubator-s4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s4/commit/7eb48827
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s4/tree/7eb48827
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s4/diff/7eb48827

Branch: refs/heads/piper
Commit: 7eb488278dff6eac63ce0004429aa35f87e51b25
Parents: 7382fc8
Author: Matthieu Morel <mm...@apache.org>
Authored: Sun Jan 15 17:21:40 2012 +0100
Committer: Matthieu Morel <mm...@apache.org>
Committed: Sun Jan 15 17:21:40 2012 +0100

----------------------------------------------------------------------
 .../s4/deploy/DistributedDeploymentManager.java    |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/7eb48827/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DistributedDeploymentManager.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DistributedDeploymentManager.java b/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DistributedDeploymentManager.java
index 9b22b70..a152672 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DistributedDeploymentManager.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/deploy/DistributedDeploymentManager.java
@@ -147,12 +147,13 @@ public class DistributedDeploymentManager implements DeploymentManager {
     }
 
     // synchronizes with startup apps loading
-    private void deployNewApps(Set<String> newApps) throws InterruptedException {
+    private void deployNewApps(Set<String> newApps) {
         try {
             signalInitialAppsLoaded.await();
         } catch (InterruptedException e1) {
-            logger.warn("Interrupted while waiting for initialization of initial application.");
-            throw e1;
+            logger.error("Interrupted while waiting for initialization of initial application. Cancelling deployment of new applications.");
+            Thread.currentThread().interrupt();
+            return;
         }
         deployApps(newApps);
     }