asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Blow (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Fix Running 'asterixnc' Without Defining Node Id
Date Thu, 09 Mar 2017 16:47:52 GMT
Michael Blow has submitted this change and it was merged.

Change subject: Fix Running 'asterixnc' Without Defining Node Id
......................................................................


Fix Running 'asterixnc' Without Defining Node Id

Running 'asterixnc -help' should emit the usage.  Running without -help
but also without supplying the node id, should also display an error
message and emit the usage.  A recent regression caused this to instead
throw an NPE, fixed by this change.

Change-Id: I7c454619f4a6611e6bdc37a0169b682c1d3a7e12
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1560
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
---
M hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/NCConfig.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  abdullah alamoudi: Looks good to me, approved
  Jenkins: Verified; No violations found; No violations found; Verified



diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/NCConfig.java
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/NCConfig.java
index 7906b52..a65719e 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/NCConfig.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/NCConfig.java
@@ -221,7 +221,7 @@
 
     public NCConfig(String nodeId, ConfigManager configManager) {
         super(configManager);
-        this.appConfig = configManager.getNodeEffectiveConfig(nodeId);
+        this.appConfig = nodeId == null ? configManager.getAppConfig() : configManager.getNodeEffectiveConfig(nodeId);
         configManager.register(Option.class);
         setNodeId(nodeId);
         this.nodeId = nodeId;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c454619f4a6611e6bdc37a0169b682c1d3a7e12
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mblow@apache.org>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mblow@apache.org>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>

Mime
View raw message