SLIDER-12159 multihoming -preserve ports

Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/4286d30c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/4286d30c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/4286d30c

Branch: refs/heads/feature/SLIDER-1259-multihomed
Commit: 4286d30c609ca18b1dedfa8a5588dd53761b91be
Parents: 2ef2bd4
Author: Steve Loughran <ste...@apache.org>
Authored: Mon Mar 5 13:01:46 2018 +0000
Committer: Steve Loughran <ste...@apache.org>
Committed: Mon Mar 5 13:02:34 2018 +0000

----------------------------------------------------------------------
 .../java/org/apache/slider/server/appmaster/SliderAppMaster.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/4286d30c/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
----------------------------------------------------------------------
diff --git 
a/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
 
b/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
index a56c141..b416bed 100644
--- 
a/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
+++ 
b/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
@@ -1685,6 +1685,9 @@ public class SliderAppMaster extends 
AbstractSliderLaunchedService
         YarnConfiguration.NM_ADDRESS,
         "0.0.0.0:" + port,
         port);
+    // but force in the desired port, irrespective of the value
+    // in the configuration fields.
+    rpcAddress = new InetSocketAddress(rpcAddress.getAddress(), port);
     rpcService =
         new WorkflowRpcService("SliderRPC",
             RpcBinder.createProtobufServer(rpcAddress, getConfig(),

Reply via email to