You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ju...@apache.org on 2017/02/07 09:48:24 UTC
hadoop git commit: MAPREDUCE-6404. Allow AM to specify a port range
for starting its webapp. Contributed by Varun Saxena. (cherry picked from
commit 7afe5b1a3165e284ae831cd307a526763399f66d)
Repository: hadoop
Updated Branches:
refs/heads/branch-2 26bed5ce5 -> 81e2d54ac
MAPREDUCE-6404. Allow AM to specify a port range for starting its webapp. Contributed by Varun Saxena.
(cherry picked from commit 7afe5b1a3165e284ae831cd307a526763399f66d)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/81e2d54a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/81e2d54a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/81e2d54a
Branch: refs/heads/branch-2
Commit: 81e2d54ac6775bf8ba0494a97b4a90c1ff42972e
Parents: 26bed5c
Author: Junping Du <ju...@apache.org>
Authored: Tue Feb 7 01:40:49 2017 -0800
Committer: Junping Du <ju...@apache.org>
Committed: Tue Feb 7 01:46:17 2017 -0800
----------------------------------------------------------------------
.../hadoop/mapreduce/v2/app/client/MRClientService.java | 4 +++-
.../main/java/org/apache/hadoop/mapreduce/MRJobConfig.java | 8 +++++++-
.../src/main/resources/mapred-default.xml | 8 ++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/81e2d54a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/client/MRClientService.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/client/MRClientService.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/client/MRClientService.java
index d378b0a..6eb42be 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/client/MRClientService.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/client/MRClientService.java
@@ -142,7 +142,9 @@ public class MRClientService extends AbstractService implements ClientService {
// running in user-land.
webApp =
WebApps.$for("mapreduce", AppContext.class, appContext, "ws")
- .withHttpPolicy(conf, Policy.HTTP_ONLY).start(new AMWebApp());
+ .withHttpPolicy(conf, Policy.HTTP_ONLY)
+ .withPortRange(conf, MRJobConfig.MR_AM_WEBAPP_PORT_RANGE)
+ .start(new AMWebApp());
} catch (Exception e) {
LOG.error("Webapps failed to start. Ignoring for now:", e);
}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/81e2d54a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java
index 51353cd..e933ef4 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java
@@ -589,7 +589,13 @@ public interface MRJobConfig {
*/
public static final String MR_AM_JOB_CLIENT_PORT_RANGE =
MR_AM_PREFIX + "job.client.port-range";
-
+
+ /**
+ * Range of ports that the MapReduce AM can use when binding for its webapp.
+ * Leave blank if you want all possible ports.
+ */
+ String MR_AM_WEBAPP_PORT_RANGE = MR_AM_PREFIX + "webapp.port-range";
+
/** Enable blacklisting of nodes in the job.*/
public static final String MR_AM_JOB_NODE_BLACKLISTING_ENABLE =
MR_AM_PREFIX + "job.node-blacklisting.enable";
http://git-wip-us.apache.org/repos/asf/hadoop/blob/81e2d54a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml
index 5aa2e71..1bbebbb 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/resources/mapred-default.xml
@@ -1386,6 +1386,14 @@
</property>
<property>
+ <name>yarn.app.mapreduce.am.webapp.port-range</name>
+ <value></value>
+ <description>Range of ports that the MapReduce AM can use for its webapp when binding.
+ Leave blank if you want all possible ports.
+ For example 50000-50050,50100-50200</description>
+</property>
+
+<property>
<name>yarn.app.mapreduce.am.job.committer.cancel-timeout</name>
<value>60000</value>
<description>The amount of time in milliseconds to wait for the output
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org