Repository: storm
Updated Branches:
  refs/heads/master 441f21039 -> 730c1a302


STORM-3273: Remove storm.local.hostname from topology conf.


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

Branch: refs/heads/master
Commit: 72be7085f8d9357295cd0991d7b4d0124d614cd7
Parents: e2563a1
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue Oct 23 09:11:28 2018 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue Oct 23 09:11:28 2018 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/72be7085/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
----------------------------------------------------------------------
diff --git 
a/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java 
b/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
index 9392ac3..5da37f8 100644
--- a/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
+++ b/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
@@ -3054,6 +3054,8 @@ public class Nimbus implements Iface, Shutdownable, 
DaemonCommon {
             Map<String, Object> otherConf = Utils.getConfigFromClasspath(cp, 
conf);
             Map<String, Object> totalConfToSave = Utils.merge(otherConf, 
topoConf);
             Map<String, Object> totalConf = Utils.merge(conf, totalConfToSave);
+
+
             //When reading the conf in nimbus we want to fall back to our own 
settings
             // if the other config does not have it set.
             topology = normalizeTopology(totalConf, topology);
@@ -3072,6 +3074,9 @@ public class Nimbus implements Iface, Shutdownable, 
DaemonCommon {
                 LOG.debug("{} set to: {}", 
Config.TOPOLOGY_EVENTLOGGER_EXECUTORS, numEventLoggerExecs);
             }
 
+            //Remove any configs that are specific to a host that might mess 
with the running topology.
+            totalConfToSave.remove(Config.STORM_LOCAL_HOSTNAME); //Don't 
override the host name, or everything looks like it is on nimbus
+
             IStormClusterState state = stormClusterState;
 
             if (creds == null && workerTokenManager != null) {
@@ -3238,6 +3243,7 @@ public class Nimbus implements Iface, Shutdownable, 
DaemonCommon {
                 if ((boolean) 
conf.getOrDefault(DaemonConfig.STORM_TOPOLOGY_CLASSPATH_BEGINNING_ENABLED, 
false)) {
                     
topoConfigOverrides.remove(Config.TOPOLOGY_CLASSPATH_BEGINNING);
                 }
+                topoConfigOverrides.remove(Config.STORM_LOCAL_HOSTNAME);
                 
options.set_topology_conf_overrides(JSONValue.toJSONString(topoConfigOverrides));
             }
             Subject subject = getSubject();

Reply via email to