hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject hadoop git commit: HDFS-13159. TestTruncateQuotaUpdate fails in trunk. Contributed by Nanda kumar.
Date Tue, 20 Feb 2018 19:40:25 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 7280c5af8 -> 9028ccaf8


HDFS-13159. TestTruncateQuotaUpdate fails in trunk. Contributed by Nanda kumar.


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

Branch: refs/heads/trunk
Commit: 9028ccaf838621808e5e26a9fa933d28799538dd
Parents: 7280c5a
Author: Arpit Agarwal <arp@apache.org>
Authored: Tue Feb 20 10:57:35 2018 -0800
Committer: Arpit Agarwal <arp@apache.org>
Committed: Tue Feb 20 11:40:20 2018 -0800

----------------------------------------------------------------------
 .../hdfs/server/namenode/TestTruncateQuotaUpdate.java     | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9028ccaf/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestTruncateQuotaUpdate.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestTruncateQuotaUpdate.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestTruncateQuotaUpdate.java
index fcdd650..f200d5e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestTruncateQuotaUpdate.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestTruncateQuotaUpdate.java
@@ -22,6 +22,8 @@ import org.apache.hadoop.fs.permission.PermissionStatus;
 import org.apache.hadoop.hdfs.protocol.Block;
 import org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo;
 import org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguous;
+import org.apache.hadoop.hdfs.server.namenode.snapshot.DiffList;
+import org.apache.hadoop.hdfs.server.namenode.snapshot.DiffListByArrayList;
 import org.apache.hadoop.hdfs.server.namenode.snapshot.FileDiff;
 import org.apache.hadoop.hdfs.server.namenode.snapshot.FileDiffList;
 import org.apache.hadoop.hdfs.server.namenode.snapshot.FileWithSnapshotFeature;
@@ -156,11 +158,11 @@ public class TestTruncateQuotaUpdate {
     FileDiff diff = mock(FileDiff.class);
     when(diff.getBlocks()).thenReturn(blocks);
     FileDiffList diffList = new FileDiffList();
-    Whitebox.setInternalState(diffList, "diffs", new ArrayList<FileDiff>());
+    Whitebox.setInternalState(diffList, "diffs", new DiffListByArrayList<>(0));
     @SuppressWarnings("unchecked")
-    ArrayList<FileDiff> diffs = ((ArrayList<FileDiff>)Whitebox.getInternalState
-        (diffList, "diffs"));
-    diffs.add(diff);
+    DiffList<FileDiff> diffs = (DiffList<FileDiff>)Whitebox.getInternalState(
+        diffList, "diffs");
+    diffs.addFirst(diff);
     FileWithSnapshotFeature sf = new FileWithSnapshotFeature(diffList);
     file.addFeature(sf);
   }


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