asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject incubator-asterixdb-hyracks git commit: This change fixes the sporadic connection refused errors after managix starts up an Asterix instance. This can mostly be seen during asterix-installer tests. The fix basically lets managix wait and listens through
Date Mon, 09 Nov 2015 06:04:34 GMT
Repository: incubator-asterixdb-hyracks
Updated Branches:
  refs/heads/master 26c3b5361 -> 32bd23cb2


This change fixes the sporadic connection refused errors after managix starts up an Asterix
instance. This can mostly be seen during asterix-installer tests.
The fix basically lets managix wait and listens through zookeeper for a signal from the cluster
controller. Once the cluster controller sends the signal, Managix can proceed.

Change-Id: I0975308e1dc2650d8c2e50d58ff2c696b22eaaa4
Reviewed-on: https://asterix-gerrit.ics.uci.edu/365
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/commit/32bd23cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/tree/32bd23cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/diff/32bd23cb

Branch: refs/heads/master
Commit: 32bd23cb2dfed36068498e60afcc0ebf7fa0cf08
Parents: 26c3b53
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Fri Nov 6 15:30:18 2015 +0300
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Sun Nov 8 21:45:25 2015 -0800

----------------------------------------------------------------------
 .../hyracks/api/application/ICCApplicationEntryPoint.java    | 2 ++
 .../apache/hyracks/control/cc/ClusterControllerService.java  | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/32bd23cb/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplicationEntryPoint.java
----------------------------------------------------------------------
diff --git a/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplicationEntryPoint.java
b/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplicationEntryPoint.java
index e47b550..1903a4b 100644
--- a/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplicationEntryPoint.java
+++ b/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplicationEntryPoint.java
@@ -22,4 +22,6 @@ public interface ICCApplicationEntryPoint {
     public void start(ICCApplicationContext ccAppCtx, String[] args) throws Exception;
 
     public void stop() throws Exception;
+
+    void startupCompleted() throws Exception;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/32bd23cb/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
----------------------------------------------------------------------
diff --git a/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
b/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
index f2f450d..e311903 100644
--- a/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
+++ b/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
@@ -153,6 +153,8 @@ public class ClusterControllerService extends AbstractRemoteService {
 
     private ShutdownRun shutdownCallback;
 
+    private ICCApplicationEntryPoint aep;
+
     public ClusterControllerService(final CCConfig ccConfig) throws Exception {
         this.ccConfig = ccConfig;
         File jobLogFolder = new File(ccConfig.ccRoot, "logs/jobs");
@@ -243,6 +245,10 @@ public class ClusterControllerService extends AbstractRemoteService {
         datasetDirectoryService.init(executor);
         workQueue.start();
         LOGGER.log(Level.INFO, "Started ClusterControllerService");
+        if (aep != null) {
+            // Sometimes, there is no application entry point. Check hyracks-client project
+            aep.startupCompleted();
+        }
     }
 
     private void startApplication() throws Exception {
@@ -251,7 +257,7 @@ public class ClusterControllerService extends AbstractRemoteService {
         String className = ccConfig.appCCMainClass;
         if (className != null) {
             Class<?> c = Class.forName(className);
-            ICCApplicationEntryPoint aep = (ICCApplicationEntryPoint) c.newInstance();
+            aep = (ICCApplicationEntryPoint) c.newInstance();
             String[] args = ccConfig.appArgs == null ? null : ccConfig.appArgs.toArray(new
String[ccConfig.appArgs
                     .size()]);
             aep.start(appCtx, args);


Mime
View raw message