You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2018/03/14 21:27:39 UTC
incubator-slider git commit: SLIDER-1259 Slider does not work in
multi homed environments. It now uses the value of yarn.nodemanager.bind-host
to set the hostname, if set Contributed by Steve Loughran.
Repository: incubator-slider
Updated Branches:
refs/heads/develop 253371f43 -> 8234cbe4e
SLIDER-1259 Slider does not work in multi homed environments. It now uses the value of yarn.nodemanager.bind-host to set the hostname, if set
Contributed by Steve Loughran.
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/8234cbe4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/8234cbe4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/8234cbe4
Branch: refs/heads/develop
Commit: 8234cbe4e5ca676f39cf121bb8ea16778d624b58
Parents: 253371f
Author: Steve Loughran <st...@apache.org>
Authored: Wed Mar 14 21:26:20 2018 +0000
Committer: Steve Loughran <st...@apache.org>
Committed: Wed Mar 14 21:26:20 2018 +0000
----------------------------------------------------------------------
.../apache/slider/server/appmaster/SliderAppMaster.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/8234cbe4/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..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
@@ -1678,7 +1678,16 @@ 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);
+ // 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(),