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 ar...@apache.org on 2015/03/18 20:35:56 UTC

[1/3] hadoop git commit: HDFS-7950. Fix TestFsDatasetImpl#testAddVolumes failure on Windows. (Contributed by Xiaoyu Yao)

Repository: hadoop
Updated Branches:
  refs/heads/branch-2 24d8c6f35 -> 97341a4a1
  refs/heads/branch-2.7 502c040c9 -> ae6d273d6
  refs/heads/trunk 30da99cba -> d462c6275


HDFS-7950. Fix TestFsDatasetImpl#testAddVolumes failure on Windows. (Contributed by Xiaoyu Yao)


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

Branch: refs/heads/trunk
Commit: d462c62755171a2e980a4946d7c8b2d689a715b5
Parents: 30da99c
Author: Arpit Agarwal <ar...@apache.org>
Authored: Wed Mar 18 12:33:59 2015 -0700
Committer: Arpit Agarwal <ar...@apache.org>
Committed: Wed Mar 18 12:35:30 2015 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt              |  3 +++
 .../datanode/fsdataset/impl/TestFsDatasetImpl.java       | 11 +++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d462c627/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 70d6cde..9e54b3d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1178,6 +1178,9 @@ Release 2.7.0 - UNRELEASED
     HDFS-7948. TestDataNodeHotSwapVolumes#testAddVolumeFailures failed on
     Windows. (Xiaoyu Yao via Arpit Agarwal)
 
+    HDFS-7950. Fix TestFsDatasetImpl#testAddVolumes failure on Windows.
+    (Xiaoyu Yao via Arpit Agarwal)
+
     BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
 
       HDFS-7720. Quota by Storage Type API, tools and ClientNameNode

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d462c627/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
index 8654773..73fcd19 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
@@ -21,6 +21,7 @@ import com.google.common.collect.Lists;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystemTestHelper;
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.StorageType;
 import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.HdfsConfiguration;
@@ -111,7 +112,7 @@ public class TestFsDatasetImpl {
     List<String> dirStrings = new ArrayList<String>();
     for (int i = 0; i < numDirs; i++) {
       File loc = new File(BASE_DIR + "/data" + i);
-      dirStrings.add(loc.toString());
+      dirStrings.add(new Path(loc.toString()).toUri().toString());
       loc.mkdirs();
       dirs.add(createStorageDirectory(loc));
       when(storage.getStorageDir(i)).thenReturn(dirs.get(i));
@@ -158,8 +159,9 @@ public class TestFsDatasetImpl {
     }
     for (int i = 0; i < numNewVolumes; i++) {
       String path = BASE_DIR + "/newData" + i;
-      expectedVolumes.add(path);
-      StorageLocation loc = StorageLocation.parse(path);
+      String pathUri = new Path(path).toUri().toString();
+      expectedVolumes.add(new File(pathUri).toString());
+      StorageLocation loc = StorageLocation.parse(pathUri);
       Storage.StorageDirectory sd = createStorageDirectory(new File(path));
       DataStorage.VolumeBuilder builder =
           new DataStorage.VolumeBuilder(storage, sd);
@@ -178,7 +180,8 @@ public class TestFsDatasetImpl {
       actualVolumes.add(
           dataset.getVolumes().get(numExistingVolumes + i).getBasePath());
     }
-    assertEquals(actualVolumes, expectedVolumes);
+    assertEquals(actualVolumes.size(), expectedVolumes.size());
+    assertTrue(actualVolumes.containsAll(expectedVolumes));
   }
 
   @Test(timeout = 30000)


[3/3] hadoop git commit: HDFS-7950. Fix TestFsDatasetImpl#testAddVolumes failure on Windows. (Contributed by Xiaoyu Yao)

Posted by ar...@apache.org.
HDFS-7950. Fix TestFsDatasetImpl#testAddVolumes failure on Windows. (Contributed by Xiaoyu Yao)


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

Branch: refs/heads/branch-2.7
Commit: ae6d273d63fdd8234bd420f63009496b57fd9dc5
Parents: 502c040
Author: Arpit Agarwal <ar...@apache.org>
Authored: Wed Mar 18 12:33:59 2015 -0700
Committer: Arpit Agarwal <ar...@apache.org>
Committed: Wed Mar 18 12:35:41 2015 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt              |  3 +++
 .../datanode/fsdataset/impl/TestFsDatasetImpl.java       | 11 +++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ae6d273d/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 0ee0ab8..0234241 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -858,6 +858,9 @@ Release 2.7.0 - UNRELEASED
     HDFS-7948. TestDataNodeHotSwapVolumes#testAddVolumeFailures failed on
     Windows. (Xiaoyu Yao via Arpit Agarwal)
 
+    HDFS-7950. Fix TestFsDatasetImpl#testAddVolumes failure on Windows.
+    (Xiaoyu Yao via Arpit Agarwal)
+
     BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
 
       HDFS-7720. Quota by Storage Type API, tools and ClientNameNode

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ae6d273d/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
index 8654773..73fcd19 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
@@ -21,6 +21,7 @@ import com.google.common.collect.Lists;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystemTestHelper;
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.StorageType;
 import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.HdfsConfiguration;
@@ -111,7 +112,7 @@ public class TestFsDatasetImpl {
     List<String> dirStrings = new ArrayList<String>();
     for (int i = 0; i < numDirs; i++) {
       File loc = new File(BASE_DIR + "/data" + i);
-      dirStrings.add(loc.toString());
+      dirStrings.add(new Path(loc.toString()).toUri().toString());
       loc.mkdirs();
       dirs.add(createStorageDirectory(loc));
       when(storage.getStorageDir(i)).thenReturn(dirs.get(i));
@@ -158,8 +159,9 @@ public class TestFsDatasetImpl {
     }
     for (int i = 0; i < numNewVolumes; i++) {
       String path = BASE_DIR + "/newData" + i;
-      expectedVolumes.add(path);
-      StorageLocation loc = StorageLocation.parse(path);
+      String pathUri = new Path(path).toUri().toString();
+      expectedVolumes.add(new File(pathUri).toString());
+      StorageLocation loc = StorageLocation.parse(pathUri);
       Storage.StorageDirectory sd = createStorageDirectory(new File(path));
       DataStorage.VolumeBuilder builder =
           new DataStorage.VolumeBuilder(storage, sd);
@@ -178,7 +180,8 @@ public class TestFsDatasetImpl {
       actualVolumes.add(
           dataset.getVolumes().get(numExistingVolumes + i).getBasePath());
     }
-    assertEquals(actualVolumes, expectedVolumes);
+    assertEquals(actualVolumes.size(), expectedVolumes.size());
+    assertTrue(actualVolumes.containsAll(expectedVolumes));
   }
 
   @Test(timeout = 30000)


[2/3] hadoop git commit: HDFS-7950. Fix TestFsDatasetImpl#testAddVolumes failure on Windows. (Contributed by Xiaoyu Yao)

Posted by ar...@apache.org.
HDFS-7950. Fix TestFsDatasetImpl#testAddVolumes failure on Windows. (Contributed by Xiaoyu Yao)


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

Branch: refs/heads/branch-2
Commit: 97341a4a1d1f7d5fed7f79e25463adb2bcbec9b2
Parents: 24d8c6f
Author: Arpit Agarwal <ar...@apache.org>
Authored: Wed Mar 18 12:33:59 2015 -0700
Committer: Arpit Agarwal <ar...@apache.org>
Committed: Wed Mar 18 12:35:35 2015 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt              |  3 +++
 .../datanode/fsdataset/impl/TestFsDatasetImpl.java       | 11 +++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/97341a4a/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 4a2085f..dc7d4a9 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -875,6 +875,9 @@ Release 2.7.0 - UNRELEASED
     HDFS-7948. TestDataNodeHotSwapVolumes#testAddVolumeFailures failed on
     Windows. (Xiaoyu Yao via Arpit Agarwal)
 
+    HDFS-7950. Fix TestFsDatasetImpl#testAddVolumes failure on Windows.
+    (Xiaoyu Yao via Arpit Agarwal)
+
     BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
 
       HDFS-7720. Quota by Storage Type API, tools and ClientNameNode

http://git-wip-us.apache.org/repos/asf/hadoop/blob/97341a4a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
index 8654773..73fcd19 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java
@@ -21,6 +21,7 @@ import com.google.common.collect.Lists;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystemTestHelper;
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.StorageType;
 import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.HdfsConfiguration;
@@ -111,7 +112,7 @@ public class TestFsDatasetImpl {
     List<String> dirStrings = new ArrayList<String>();
     for (int i = 0; i < numDirs; i++) {
       File loc = new File(BASE_DIR + "/data" + i);
-      dirStrings.add(loc.toString());
+      dirStrings.add(new Path(loc.toString()).toUri().toString());
       loc.mkdirs();
       dirs.add(createStorageDirectory(loc));
       when(storage.getStorageDir(i)).thenReturn(dirs.get(i));
@@ -158,8 +159,9 @@ public class TestFsDatasetImpl {
     }
     for (int i = 0; i < numNewVolumes; i++) {
       String path = BASE_DIR + "/newData" + i;
-      expectedVolumes.add(path);
-      StorageLocation loc = StorageLocation.parse(path);
+      String pathUri = new Path(path).toUri().toString();
+      expectedVolumes.add(new File(pathUri).toString());
+      StorageLocation loc = StorageLocation.parse(pathUri);
       Storage.StorageDirectory sd = createStorageDirectory(new File(path));
       DataStorage.VolumeBuilder builder =
           new DataStorage.VolumeBuilder(storage, sd);
@@ -178,7 +180,8 @@ public class TestFsDatasetImpl {
       actualVolumes.add(
           dataset.getVolumes().get(numExistingVolumes + i).getBasePath());
     }
-    assertEquals(actualVolumes, expectedVolumes);
+    assertEquals(actualVolumes.size(), expectedVolumes.size());
+    assertTrue(actualVolumes.containsAll(expectedVolumes));
   }
 
   @Test(timeout = 30000)