You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2018/02/01 15:20:40 UTC

storm git commit: STORM-2917: Check the derecated config nimbus.host

Repository: storm
Updated Branches:
  refs/heads/master 1c7361982 -> 18045a3fc


STORM-2917: Check the derecated config nimbus.host

There is a situation: the deployer wants to use the new nimbus config(nimbus.seeds), but still leave the blank deprecated config(nimbus.host) in storm.yaml. It will not work.

To avoid this, the program should at least check whether the deprecated config is blank.

Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/18045a3f
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/18045a3f
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/18045a3f

Branch: refs/heads/master
Commit: 18045a3fca0c2cc2f5f7cc0241233c25b17432fe
Parents: 1c73619
Author: MichealShin <lu...@126.com>
Authored: Tue Jan 30 17:42:38 2018 +0800
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Fri Feb 2 00:09:02 2018 +0900

----------------------------------------------------------------------
 storm-client/src/jvm/org/apache/storm/utils/NimbusClient.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/18045a3f/storm-client/src/jvm/org/apache/storm/utils/NimbusClient.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/utils/NimbusClient.java b/storm-client/src/jvm/org/apache/storm/utils/NimbusClient.java
index 2f4f6dd..e27304a 100644
--- a/storm-client/src/jvm/org/apache/storm/utils/NimbusClient.java
+++ b/storm-client/src/jvm/org/apache/storm/utils/NimbusClient.java
@@ -23,6 +23,8 @@ import java.security.Principal;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
 import org.apache.storm.Config;
 import org.apache.storm.generated.Nimbus;
 import org.apache.storm.generated.NimbusSummary;
@@ -131,7 +133,7 @@ public class NimbusClient extends ThriftClient {
         }
 
         List<String> seeds;
-        if (conf.containsKey(Config.NIMBUS_HOST)) {
+        if (conf.containsKey(Config.NIMBUS_HOST) && StringUtils.isNotBlank(conf.get(Config.NIMBUS_HOST).toString())) {
             LOG.warn("Using deprecated config {} for backward compatibility. Please update your storm.yaml so it only has config {}",
                      Config.NIMBUS_HOST, Config.NIMBUS_SEEDS);
             seeds = Lists.newArrayList(conf.get(Config.NIMBUS_HOST).toString());