hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lium...@apache.org
Subject [05/50] [abbrv] hadoop git commit: YARN-6643. TestRMFailover fails rarely due to port conflict. Contributed by Robert Kanter
Date Tue, 06 Jun 2017 08:27:55 GMT
YARN-6643. TestRMFailover fails rarely due to port conflict. Contributed by Robert Kanter


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/3fd6a2da
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/3fd6a2da
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/3fd6a2da

Branch: refs/heads/HADOOP-13345
Commit: 3fd6a2da4e537423d1462238e10cc9e1f698d1c2
Parents: 1161563
Author: Jason Lowe <jlowe@yahoo-inc.com>
Authored: Thu May 25 16:07:52 2017 -0500
Committer: Jason Lowe <jlowe@yahoo-inc.com>
Committed: Thu May 25 16:07:52 2017 -0500

----------------------------------------------------------------------
 .../hadoop/yarn/server/resourcemanager/HATestUtil.java      | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3fd6a2da/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/HATestUtil.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/HATestUtil.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/HATestUtil.java
index 710ce87..ac245c3 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/HATestUtil.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/HATestUtil.java
@@ -18,16 +18,19 @@
 package org.apache.hadoop.yarn.server.resourcemanager;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.net.ServerSocketUtil;
 import org.apache.hadoop.yarn.conf.HAUtil;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 
+import java.io.IOException;
+
 public class HATestUtil {
 
   public static void setRpcAddressForRM(String rmId, int base,
-      Configuration conf) {
+      Configuration conf) throws IOException {
     for (String confKey : YarnConfiguration.getServiceAddressConfKeys(conf)) {
-      setConfForRM(rmId, confKey, "0.0.0.0:" + (base +
-          YarnConfiguration.getRMDefaultPortNumber(confKey, conf)), conf);
+      setConfForRM(rmId, confKey, "0.0.0.0:" + ServerSocketUtil.getPort(base +
+          YarnConfiguration.getRMDefaultPortNumber(confKey, conf), 10), conf);
     }
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message