SLIDER-1259: use NM bind host and address to define what the container should 
come up as. Issue: how do these get set? That is: will they be in the configs


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

Branch: refs/heads/feature/SLIDER-1259-multihomed
Commit: 2ef2bd45983d516cb65f13a2e173338388b1855e
Parents: 7ee66cd
Author: Steve Loughran <ste...@apache.org>
Authored: Wed Feb 14 17:26:34 2018 +0000
Committer: Steve Loughran <ste...@apache.org>
Committed: Mon Mar 5 13:02:34 2018 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/2ef2bd45/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 c12fae8..a56c141 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
@@ -1678,7 +1678,13 @@ public class SliderAppMaster extends 
AbstractSliderLaunchedService
             protobufRelay);
 
     int port = getPortToRequest();
-    InetSocketAddress rpcAddress = new InetSocketAddress("0.0.0.0", port);
+
+    // use the same host and address options as the NM
+    InetSocketAddress rpcAddress = getConfig().getSocketAddr(
+        YarnConfiguration.NM_BIND_HOST,
+        YarnConfiguration.NM_ADDRESS,
+        "0.0.0.0:" + port,
+        port);
     rpcService =
         new WorkflowRpcService("SliderRPC",
             RpcBinder.createProtobufServer(rpcAddress, getConfig(),

Reply via email to