hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [09/35] hadoop git commit: HADOOP-14594. ITestS3AFileOperationCost::testFakeDirectoryDeletion to uncomment metric assertions. Contributed by Mingliang Liu
Date Fri, 30 Jun 2017 14:59:50 GMT
HADOOP-14594. ITestS3AFileOperationCost::testFakeDirectoryDeletion to uncomment metric assertions.
Contributed by Mingliang Liu


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

Branch: refs/heads/HADOOP-13345
Commit: bc4dfe9c9cb31f39e8f1532d5c5837faf2e92bde
Parents: 94e39c6
Author: Mingliang Liu <liuml07@apache.org>
Authored: Mon Jun 26 16:36:39 2017 -0700
Committer: Mingliang Liu <liuml07@apache.org>
Committed: Tue Jun 27 13:19:14 2017 -0700

----------------------------------------------------------------------
 .../hadoop/fs/s3a/ITestS3AFileOperationCost.java    | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/bc4dfe9c/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java
b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java
index 7fb54b1..00171f0 100644
--- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java
+++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java
@@ -199,21 +199,20 @@ public class ITestS3AFileOperationCost extends AbstractS3ATestBase {
         new MetricDiff(fs, Statistic.DIRECTORIES_CREATED);
 
     Path srcDir = new Path(srcBaseDir, "1/2/3/4/5/6");
-    Path srcFilePath = new Path(srcDir, "source.txt");
     int srcDirDepth = directoriesInPath(srcDir);
     // one dir created, one removed
     mkdirs(srcDir);
     String state = "after mkdir(srcDir)";
     directoriesCreated.assertDiffEquals(state, 1);
-/*  TODO: uncomment once HADOOP-13222 is in
     deleteRequests.assertDiffEquals(state, 1);
     directoriesDeleted.assertDiffEquals(state, 0);
-    fakeDirectoriesDeleted.assertDiffEquals(state, srcDirDepth);
-*/
+    // HADOOP-14255 deletes unnecessary fake directory objects in mkdirs()
+    fakeDirectoriesDeleted.assertDiffEquals(state, srcDirDepth - 1);
     reset(deleteRequests, directoriesCreated, directoriesDeleted,
         fakeDirectoriesDeleted);
 
     // creating a file should trigger demise of the src dir
+    final Path srcFilePath = new Path(srcDir, "source.txt");
     touch(fs, srcFilePath);
     state = "after touch(fs, srcFilePath)";
     deleteRequests.assertDiffEquals(state, 1);
@@ -232,12 +231,9 @@ public class ITestS3AFileOperationCost extends AbstractS3ATestBase {
 
     int destDirDepth = directoriesInPath(destDir);
     directoriesCreated.assertDiffEquals(state, 1);
-/*  TODO: uncomment once HADOOP-13222 "s3a.mkdirs() to delete empty fake parent directories"
-    is in
-    deleteRequests.assertDiffEquals(state,1);
-    directoriesDeleted.assertDiffEquals(state,0);
-    fakeDirectoriesDeleted.assertDiffEquals(state,destDirDepth);
-*/
+    deleteRequests.assertDiffEquals(state, 1);
+    directoriesDeleted.assertDiffEquals(state, 0);
+    fakeDirectoriesDeleted.assertDiffEquals(state, destDirDepth - 1);
     reset(deleteRequests, directoriesCreated, directoriesDeleted,
         fakeDirectoriesDeleted);
 


---------------------------------------------------------------------
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