commit | df9ccbb7989358e706fd0c858ea215ee0e03b30f | [log] [tgz] |
---|---|---|
author | Michael Blow <mblow@apache.org> | Wed Mar 08 19:32:37 2017 -0500 |
committer | Michael Blow <mblow@apache.org> | Thu Mar 09 08:47:35 2017 -0800 |
tree | c41f90b9c8c4d350a484f0c04a3643f634c9d12e | |
parent | 2fe1d18dbf1825a653c340473f3b53fc9116e8b6 [diff] |
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>
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;