hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject [37/50] [abbrv] hadoop git commit: HDFS-9069. TestNameNodeMetricsLogger failing -port in use. (stevel)
Date Tue, 15 Sep 2015 19:12:22 GMT
HDFS-9069. TestNameNodeMetricsLogger failing -port in use. (stevel)


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

Branch: refs/heads/HADOOP-11890
Commit: 6955771261ad0047056eb7c2505ba9915fce60d3
Parents: e1b1d7e
Author: Steve Loughran <stevel@apache.org>
Authored: Mon Sep 14 10:36:34 2015 +0100
Committer: Steve Loughran <stevel@apache.org>
Committed: Mon Sep 14 10:36:44 2015 +0100

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                     | 3 +++
 .../hadoop/hdfs/server/namenode/TestNameNodeMetricsLogger.java  | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/69557712/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index b1ba39b..cb0fae9 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1322,6 +1322,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-9041. Move entries in META-INF/services/o.a.h.fs.FileSystem to
     hdfs-client. (Mingliang Liu via wheat9)
 
+    HDFS-9069. TestNameNodeMetricsLogger failing -port in use.
+    (stevel)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/69557712/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMetricsLogger.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMetricsLogger.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMetricsLogger.java
index c8dc6ec..6968bc4 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMetricsLogger.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMetricsLogger.java
@@ -25,6 +25,7 @@ import org.apache.commons.logging.impl.Log4JLogger;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hdfs.HdfsConfiguration;
 import org.apache.hadoop.metrics2.util.MBeans;
+import org.apache.hadoop.net.ServerSocketUtil;
 import org.apache.hadoop.test.GenericTestUtils;
 import org.apache.log4j.Appender;
 import org.apache.log4j.AppenderSkeleton;
@@ -118,8 +119,8 @@ public class TestNameNodeMetricsLogger {
     return new TestNameNode(conf);
   }
 
-  private int getRandomPort() {
-    return 10000 + random.nextInt(50000);
+  private int getRandomPort() throws IOException {
+    return ServerSocketUtil.getPort(0, 10);
   }
 
   private void addAppender(Log log, Appender appender) {


Mime
View raw message