hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject [42/50] [abbrv] hadoop git commit: HADOOP-11535 TableMapping related tests failed due to 'successful' resolving of invalid test hostname
Date Fri, 06 Feb 2015 21:47:14 GMT
HADOOP-11535 TableMapping related tests failed due to 'successful' resolving of invalid test
hostname


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

Branch: refs/heads/HDFS-EC
Commit: bde495d01700a7db918fafe4f10424a008818af2
Parents: a5e5f30
Author: Steve Loughran <stevel@apache.org>
Authored: Fri Feb 6 13:03:30 2015 +0000
Committer: Zhe Zhang <zhz@apache.org>
Committed: Fri Feb 6 13:45:52 2015 -0800

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt |  3 ++
 .../org/apache/hadoop/net/TestTableMapping.java | 43 +++++++++++---------
 2 files changed, 26 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/bde495d0/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 66c2cba..884ba66 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -873,6 +873,9 @@ Release 2.7.0 - UNRELEASED
     HADOOP-11526. Memory leak in Bzip2Compressor and Bzip2Decompressor.
     (Anu Engineer via cnauroth)
 
+    HADOOP-11535 TableMapping related tests failed due to 'successful'
+    resolving of invalid test hostname. (Kai Zheng via stevel)
+
 Release 2.6.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/bde495d0/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java
index 5281694..a93f9ea 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java
@@ -34,12 +34,15 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class TestTableMapping {
+  private String hostName1 = "1.2.3.4";
+  private String hostName2 = "5.6.7.8";
+
   @Test
   public void testResolve() throws IOException {
     File mapFile = File.createTempFile(getClass().getSimpleName() +
         ".testResolve", ".txt");
-    Files.write("a.b.c /rack1\n" +
-                "1.2.3.4\t/rack2\n", mapFile, Charsets.UTF_8);
+    Files.write(hostName1 + " /rack1\n" +
+                hostName2 + "\t/rack2\n", mapFile, Charsets.UTF_8);
     mapFile.deleteOnExit();
     TableMapping mapping = new TableMapping();
 
@@ -48,8 +51,8 @@ public class TestTableMapping {
     mapping.setConf(conf);
 
     List<String> names = new ArrayList<String>();
-    names.add("a.b.c");
-    names.add("1.2.3.4");
+    names.add(hostName1);
+    names.add(hostName2);
 
     List<String> result = mapping.resolve(names);
     assertEquals(names.size(), result.size());
@@ -61,8 +64,8 @@ public class TestTableMapping {
   public void testTableCaching() throws IOException {
     File mapFile = File.createTempFile(getClass().getSimpleName() +
         ".testTableCaching", ".txt");
-    Files.write("a.b.c /rack1\n" +
-                "1.2.3.4\t/rack2\n", mapFile, Charsets.UTF_8);
+    Files.write(hostName1 + " /rack1\n" +
+        hostName2 + "\t/rack2\n", mapFile, Charsets.UTF_8);
     mapFile.deleteOnExit();
     TableMapping mapping = new TableMapping();
 
@@ -71,8 +74,8 @@ public class TestTableMapping {
     mapping.setConf(conf);
 
     List<String> names = new ArrayList<String>();
-    names.add("a.b.c");
-    names.add("1.2.3.4");
+    names.add(hostName1);
+    names.add(hostName2);
 
     List<String> result1 = mapping.resolve(names);
     assertEquals(names.size(), result1.size());
@@ -94,8 +97,8 @@ public class TestTableMapping {
     mapping.setConf(conf);
 
     List<String> names = new ArrayList<String>();
-    names.add("a.b.c");
-    names.add("1.2.3.4");
+    names.add(hostName1);
+    names.add(hostName2);
 
     List<String> result = mapping.resolve(names);
     assertEquals(names.size(), result.size());
@@ -112,8 +115,8 @@ public class TestTableMapping {
     mapping.setConf(conf);
 
     List<String> names = new ArrayList<String>();
-    names.add("a.b.c");
-    names.add("1.2.3.4");
+    names.add(hostName1);
+    names.add(hostName2);
 
     List<String> result = mapping.resolve(names);
     assertEquals(names.size(), result.size());
@@ -125,8 +128,8 @@ public class TestTableMapping {
   public void testClearingCachedMappings() throws IOException {
     File mapFile = File.createTempFile(getClass().getSimpleName() +
         ".testClearingCachedMappings", ".txt");
-    Files.write("a.b.c /rack1\n" +
-                "1.2.3.4\t/rack2\n", mapFile, Charsets.UTF_8);
+    Files.write(hostName1 + " /rack1\n" +
+                hostName2 + "\t/rack2\n", mapFile, Charsets.UTF_8);
     mapFile.deleteOnExit();
 
     TableMapping mapping = new TableMapping();
@@ -136,8 +139,8 @@ public class TestTableMapping {
     mapping.setConf(conf);
 
     List<String> names = new ArrayList<String>();
-    names.add("a.b.c");
-    names.add("1.2.3.4");
+    names.add(hostName1);
+    names.add(hostName2);
 
     List<String> result = mapping.resolve(names);
     assertEquals(names.size(), result.size());
@@ -149,8 +152,8 @@ public class TestTableMapping {
     mapping.reloadCachedMappings();
 
     names = new ArrayList<String>();
-    names.add("a.b.c");
-    names.add("1.2.3.4");
+    names.add(hostName1);
+    names.add(hostName2);
 
     result = mapping.resolve(names);
     assertEquals(names.size(), result.size());
@@ -172,8 +175,8 @@ public class TestTableMapping {
     mapping.setConf(conf);
 
     List<String> names = new ArrayList<String>();
-    names.add("a.b.c");
-    names.add("1.2.3.4");
+    names.add(hostName1);
+    names.add(hostName2);
 
     List<String> result = mapping.resolve(names);
     assertEquals(names.size(), result.size());


Mime
View raw message