You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by ti...@apache.org on 2017/08/04 22:35:04 UTC
asterixdb git commit: [ASTERIXDB-2014][HYR][CLUS] Respect disabled
NCService
Repository: asterixdb
Updated Branches:
refs/heads/master 4cb617a21 -> 27434300c
[ASTERIXDB-2014][HYR][CLUS] Respect disabled NCService
- Don't contact NCService on failed nodes, if NCService is disabled
- Also, don't block work queue for TriggerNCWork
Change-Id: Ib307f06d8bbcf4039480291aef566f240cadba20
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1913
Reviewed-by: Till Westmann <ti...@apache.org>
Integration-Tests: Till Westmann <ti...@apache.org>
Tested-by: Till Westmann <ti...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/27434300
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/27434300
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/27434300
Branch: refs/heads/master
Commit: 27434300cc39e9808f314a6ea539011c97d4fdc7
Parents: 4cb617a
Author: Michael Blow <mb...@apache.org>
Authored: Thu Aug 3 18:09:02 2017 -0400
Committer: Till Westmann <ti...@apache.org>
Committed: Thu Aug 3 16:43:30 2017 -0700
----------------------------------------------------------------------
.../control/cc/ClusterControllerService.java | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/27434300/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
index e1c218f..d32e577 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
@@ -257,7 +257,7 @@ public class ClusterControllerService implements IControllerService {
getNCServices().entrySet().forEach(ncService -> {
final TriggerNCWork triggerWork = new TriggerNCWork(ClusterControllerService.this,
ncService.getValue().getLeft(), ncService.getValue().getRight(), ncService.getKey());
- workQueue.schedule(triggerWork);
+ executor.submit(triggerWork);
});
serviceCtx.addClusterLifecycleListener(new IClusterLifecycleListener() {
@Override
@@ -271,9 +271,11 @@ public class ClusterControllerService implements IControllerService {
LOGGER.log(Level.WARNING, "Getting notified that nodes: " + deadNodeIds + " has failed");
for (String nodeId : deadNodeIds) {
Pair<String, Integer> ncService = getNCService(nodeId);
- final TriggerNCWork triggerWork = new TriggerNCWork(ClusterControllerService.this,
- ncService.getLeft(), ncService.getRight(), nodeId);
- workQueue.schedule(triggerWork);
+ if (ncService.getRight() != NCConfig.NCSERVICE_PORT_DISABLED) {
+ final TriggerNCWork triggerWork = new TriggerNCWork(ClusterControllerService.this,
+ ncService.getLeft(), ncService.getRight(), nodeId);
+ executor.submit(triggerWork);
+ }
}
}
});
@@ -282,10 +284,12 @@ public class ClusterControllerService implements IControllerService {
private void terminateNCServices() throws Exception {
List<ShutdownNCServiceWork> shutdownNCServiceWorks = new ArrayList<>();
getNCServices().entrySet().forEach(ncService -> {
- ShutdownNCServiceWork shutdownWork = new ShutdownNCServiceWork(ncService.getValue().getLeft(),
- ncService.getValue().getRight(), ncService.getKey());
- workQueue.schedule(shutdownWork);
- shutdownNCServiceWorks.add(shutdownWork);
+ if (ncService.getValue().getRight() != NCConfig.NCSERVICE_PORT_DISABLED) {
+ ShutdownNCServiceWork shutdownWork = new ShutdownNCServiceWork(ncService.getValue().getLeft(),
+ ncService.getValue().getRight(), ncService.getKey());
+ workQueue.schedule(shutdownWork);
+ shutdownNCServiceWorks.add(shutdownWork);
+ }
});
for (ShutdownNCServiceWork shutdownWork : shutdownNCServiceWorks) {
shutdownWork.sync();