asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdullah alamoudi (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in hyracks[master]: This change fixes the sporadic connection refused errors aft...
Date Mon, 09 Nov 2015 05:45:25 GMT
abdullah alamoudi has submitted this change and it was merged.

Change subject: 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 c
......................................................................


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>
---
M hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/application/ICCApplicationEntryPoint.java
M hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
2 files changed, 9 insertions(+), 1 deletion(-)

Approvals:
  Till Westmann: Looks good to me, approved
  Jenkins: Verified



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 void start(ICCApplicationContext ccAppCtx, String[] args) throws Exception;
 
     public void stop() throws Exception;
+
+    void startupCompleted() throws Exception;
 }
\ No newline at end of file
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 @@
 
     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 @@
         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 @@
         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);

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/365
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0975308e1dc2650d8c2e50d58ff2c696b22eaaa4
Gerrit-PatchSet: 5
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-Reviewer: Chris Hillery <ceej@lambda.nu>
Gerrit-Reviewer: Ian Maxon <imaxon@apache.org>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Murtadha Hubail <hubailmor@gmail.com>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>

Mime
View raw message