From bffd4624fb951e3f0ab3e81f0726895cdc474b14 Mon Sep 17 00:00:00 2001 From: Swaminathan Balachandran Date: Sat, 1 Jul 2023 11:34:24 -0700 Subject: [PATCH 1/9] HDDS-8970. Snapshot Diff should return path relative to bucket root --- .../snapshot/SnapshotDiffReportOzone.java | 48 +------------------ .../hadoop/ozone/om/TestOmSnapshot.java | 23 ++++----- .../om/snapshot/SnapshotDiffManager.java | 19 ++++---- 3 files changed, 22 insertions(+), 68 deletions(-) diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/snapshot/SnapshotDiffReportOzone.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/snapshot/SnapshotDiffReportOzone.java index 14f204999f5a..c04c09b219ae 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/snapshot/SnapshotDiffReportOzone.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/snapshot/SnapshotDiffReportOzone.java @@ -24,15 +24,12 @@ import org.apache.hadoop.hdds.utils.db.Codec; import org.apache.hadoop.hdds.utils.db.DelegatedCodec; import org.apache.hadoop.hdds.utils.db.Proto2Codec; -import org.apache.hadoop.hdfs.DFSUtilClient; -import org.apache.hadoop.hdfs.protocol.SnapshotDiffReport; import org.apache.hadoop.ozone.OFSPath; import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos; import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.DiffReportEntryProto; import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SnapshotDiffReportProto; import java.nio.charset.StandardCharsets; -import java.nio.file.Paths; import java.util.List; import java.util.stream.Collectors; @@ -166,7 +163,7 @@ public static DiffReportEntry fromProtobufDiffReportEntry( return null; } DiffType type = fromProtobufDiffType(entry.getDiffType()); - return type == null ? null : new DiffReportEntryOzone(type, + return type == null ? null : new DiffReportEntry(type, entry.getSourcePath().getBytes(StandardCharsets.UTF_8), entry.hasTargetPath() ? entry.getTargetPath().getBytes(StandardCharsets.UTF_8) : null); @@ -194,7 +191,7 @@ public static DiffReportEntry getDiffReportEntry(final DiffType type, public static DiffReportEntry getDiffReportEntry(final DiffType type, final String sourcePath, final String targetPath) { - return new DiffReportEntryOzone(type, + return new DiffReportEntry(type, sourcePath.getBytes(StandardCharsets.UTF_8), targetPath != null ? targetPath.getBytes(StandardCharsets.UTF_8) : null); @@ -208,45 +205,4 @@ public static DiffReportEntry getDiffReportEntry(final DiffType type, public void aggregate(SnapshotDiffReportOzone diffReport) { this.getDiffList().addAll(diffReport.getDiffList()); } - - /** - * DiffReportEntry for ozone. - */ - public static class DiffReportEntryOzone extends DiffReportEntry { - - public DiffReportEntryOzone(DiffType type, byte[] sourcePath) { - super(type, sourcePath); - } - - public DiffReportEntryOzone(DiffType type, byte[][] sourcePathComponents) { - super(type, sourcePathComponents); - } - - public DiffReportEntryOzone(DiffType type, byte[] sourcePath, - byte[] targetPath) { - super(type, sourcePath, targetPath); - } - - public DiffReportEntryOzone(DiffType type, byte[][] sourcePathComponents, - byte[][] targetPathComponents) { - super(type, sourcePathComponents, targetPathComponents); - } - - static String getPathString(byte[] path) { - String pathStr = DFSUtilClient.bytes2String(path); - return pathStr.isEmpty() ? "." : Paths.get(pathStr) - .toAbsolutePath().toString(); - } - - @Override - public String toString() { - String str = this.getType().getLabel() + "\t" + - getPathString(this.getSourcePath()); - if (this.getType() == SnapshotDiffReport.DiffType.RENAME) { - str = str + " -> " + getPathString(this.getTargetPath()); - } - - return str; - } - } } diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java index f64594f76f10..a00227504a11 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java @@ -231,7 +231,7 @@ private void init() throws Exception { // stop the deletion services so that keys can still be read keyManager.stop(); - preFinalizationChecks(); +// preFinalizationChecks(); finalizeOMUpgrade(); counter = new AtomicInteger(); } @@ -616,7 +616,7 @@ public void testSnapDiffWithDirRename() throws Exception { snap1, snap2); Assertions.assertEquals(Arrays.asList( SnapshotDiffReportOzone.getDiffReportEntry( - SnapshotDiffReport.DiffType.RENAME, "/dir1", "/dir1_rename")), + SnapshotDiffReport.DiffType.RENAME, "dir1", "dir1_rename")), diff.getDiffList()); } @@ -659,11 +659,9 @@ public void testSnapDiff() throws Exception { Assert.assertEquals(2, diff2.getDiffList().size()); Assert.assertEquals( Arrays.asList(SnapshotDiffReportOzone.getDiffReportEntry( - SnapshotDiffReport.DiffType.DELETE, - OZONE_URI_DELIMITER + key1), + SnapshotDiffReport.DiffType.DELETE, key1), SnapshotDiffReportOzone.getDiffReportEntry( - SnapshotDiffReport.DiffType.CREATE, - OZONE_URI_DELIMITER + key2)), + SnapshotDiffReport.DiffType.CREATE, key2)), diff2.getDiffList()); // Rename Key2 @@ -677,8 +675,8 @@ public void testSnapDiff() throws Exception { Assert.assertEquals(1, diff3.getDiffList().size()); Assert.assertTrue(diff3.getDiffList().contains( SnapshotDiffReportOzone.getDiffReportEntry( - SnapshotDiffReportOzone.DiffType.RENAME, OZONE_URI_DELIMITER + key2, - OZONE_URI_DELIMITER + key2Renamed))); + SnapshotDiffReportOzone.DiffType.RENAME, key2, + key2Renamed))); // Create a directory @@ -691,8 +689,7 @@ public void testSnapDiff() throws Exception { Assert.assertEquals(1, diff4.getDiffList().size()); Assert.assertTrue(diff4.getDiffList().contains( SnapshotDiffReportOzone.getDiffReportEntry( - SnapshotDiffReportOzone.DiffType.CREATE, - OM_KEY_PREFIX + dir1))); + SnapshotDiffReportOzone.DiffType.CREATE, dir1))); String key3 = createFileKeyWithPrefix(bucket1, "key-3-"); String snap6 = "snap" + counter.incrementAndGet(); @@ -707,10 +704,10 @@ public void testSnapDiff() throws Exception { diff5 = getSnapDiffReport(volume, bucket, snap6, snap7); List expectedDiffList = Arrays.asList(SnapshotDiffReportOzone.getDiffReportEntry( - SnapshotDiffReport.DiffType.RENAME, OZONE_URI_DELIMITER + key3, - OZONE_URI_DELIMITER + renamedKey3), + SnapshotDiffReport.DiffType.RENAME, key3, + renamedKey3), SnapshotDiffReportOzone.getDiffReportEntry( - SnapshotDiffReport.DiffType.MODIFY, OZONE_URI_DELIMITER + key3) + SnapshotDiffReport.DiffType.MODIFY, key3) ); assertEquals(expectedDiffList, diff5.getDiffList()); } diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java index 0378e9edc0a5..64930d3dd83e 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java @@ -1266,8 +1266,8 @@ private void validateEstimatedKeyChangesAreInLimits( } @SuppressFBWarnings("DMI_HARDCODED_ABSOLUTE_FILENAME") - private String resolveAbsolutePath(boolean isFSOBucket, - final Optional> parentIdMap, byte[] keyVal) + private String resolveBucketRelativePath(boolean isFSOBucket, + final Optional> parentIdMap, byte[] keyVal) throws IOException { String key = codecRegistry.asObject(keyVal, String.class); if (isFSOBucket) { @@ -1279,9 +1279,10 @@ private String resolveAbsolutePath(boolean isFSOBucket, parentId)); } return parentIdMap.map(m -> m.get(parentId).resolve(splitKey[1])) - .get().toString(); + .get().toString().substring(1); } - return Paths.get(OzoneConsts.OZONE_URI_DELIMITER).resolve(key).toString(); + return Paths.get(OzoneConsts.OZONE_URI_DELIMITER).resolve(key).toString() + .substring(1); } @SuppressWarnings({"checkstyle:ParameterNumber", "checkstyle:MethodLength"}) @@ -1366,27 +1367,27 @@ long generateDiffReport( throw new IllegalStateException( "Old and new key name both are null"); } else if (oldKeyName == null) { // Key Created. - String key = resolveAbsolutePath(isFSOBucket, newParentIdPathMap, + String key = resolveBucketRelativePath(isFSOBucket, newParentIdPathMap, newKeyName); DiffReportEntry entry = SnapshotDiffReportOzone.getDiffReportEntry(CREATE, key); createDiffs.add(codecRegistry.asRawData(entry)); } else if (newKeyName == null) { // Key Deleted. - String key = resolveAbsolutePath(isFSOBucket, oldParentIdPathMap, + String key = resolveBucketRelativePath(isFSOBucket, oldParentIdPathMap, oldKeyName); DiffReportEntry entry = SnapshotDiffReportOzone.getDiffReportEntry(DELETE, key); deleteDiffs.add(codecRegistry.asRawData(entry)); } else if (Arrays.equals(oldKeyName, newKeyName)) { // Key modified. - String key = resolveAbsolutePath(isFSOBucket, newParentIdPathMap, + String key = resolveBucketRelativePath(isFSOBucket, newParentIdPathMap, newKeyName); DiffReportEntry entry = SnapshotDiffReportOzone.getDiffReportEntry(MODIFY, key); modifyDiffs.add(codecRegistry.asRawData(entry)); } else { // Key Renamed. - String oldKey = resolveAbsolutePath(isFSOBucket, oldParentIdPathMap, + String oldKey = resolveBucketRelativePath(isFSOBucket, oldParentIdPathMap, oldKeyName); - String newKey = resolveAbsolutePath(isFSOBucket, newParentIdPathMap, + String newKey = resolveBucketRelativePath(isFSOBucket, newParentIdPathMap, newKeyName); renameDiffs.add(codecRegistry.asRawData( SnapshotDiffReportOzone.getDiffReportEntry(RENAME, oldKey, From 1f5d2104228cf3c526f0b525622f108c29332ff3 Mon Sep 17 00:00:00 2001 From: Swaminathan Balachandran Date: Sat, 1 Jul 2023 12:24:22 -0700 Subject: [PATCH 2/9] HDDS-8970. Fix checkstyle --- .../om/snapshot/SnapshotDiffManager.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java index 64930d3dd83e..19f2976978e8 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java @@ -1367,28 +1367,28 @@ long generateDiffReport( throw new IllegalStateException( "Old and new key name both are null"); } else if (oldKeyName == null) { // Key Created. - String key = resolveBucketRelativePath(isFSOBucket, newParentIdPathMap, - newKeyName); + String key = resolveBucketRelativePath(isFSOBucket, + newParentIdPathMap, newKeyName); DiffReportEntry entry = SnapshotDiffReportOzone.getDiffReportEntry(CREATE, key); createDiffs.add(codecRegistry.asRawData(entry)); } else if (newKeyName == null) { // Key Deleted. - String key = resolveBucketRelativePath(isFSOBucket, oldParentIdPathMap, - oldKeyName); + String key = resolveBucketRelativePath(isFSOBucket, + oldParentIdPathMap, oldKeyName); DiffReportEntry entry = SnapshotDiffReportOzone.getDiffReportEntry(DELETE, key); deleteDiffs.add(codecRegistry.asRawData(entry)); } else if (Arrays.equals(oldKeyName, newKeyName)) { // Key modified. - String key = resolveBucketRelativePath(isFSOBucket, newParentIdPathMap, - newKeyName); + String key = resolveBucketRelativePath(isFSOBucket, + newParentIdPathMap, newKeyName); DiffReportEntry entry = SnapshotDiffReportOzone.getDiffReportEntry(MODIFY, key); modifyDiffs.add(codecRegistry.asRawData(entry)); } else { // Key Renamed. - String oldKey = resolveBucketRelativePath(isFSOBucket, oldParentIdPathMap, - oldKeyName); - String newKey = resolveBucketRelativePath(isFSOBucket, newParentIdPathMap, - newKeyName); + String oldKey = resolveBucketRelativePath(isFSOBucket, + oldParentIdPathMap, oldKeyName); + String newKey = resolveBucketRelativePath(isFSOBucket, + newParentIdPathMap, newKeyName); renameDiffs.add(codecRegistry.asRawData( SnapshotDiffReportOzone.getDiffReportEntry(RENAME, oldKey, newKey))); From dc5e980c6deee86188b14065a97459547de21f6f Mon Sep 17 00:00:00 2001 From: Swaminathan Balachandran Date: Sat, 1 Jul 2023 13:08:54 -0700 Subject: [PATCH 3/9] HDDS-8970. Fix checkstyle --- .../src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java | 1 - 1 file changed, 1 deletion(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java index a00227504a11..480cecbe835d 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java @@ -88,7 +88,6 @@ import java.util.stream.Collectors; import static org.apache.hadoop.hdds.HddsConfigKeys.HDDS_DB_PROFILE; -import static org.apache.hadoop.ozone.OzoneConsts.OZONE_URI_DELIMITER; import static org.apache.hadoop.ozone.admin.scm.FinalizeUpgradeCommandUtil.isDone; import static org.apache.hadoop.ozone.admin.scm.FinalizeUpgradeCommandUtil.isStarting; import static org.apache.hadoop.ozone.OzoneConsts.OM_KEY_PREFIX; From 7c35535790e09956a9fccd30e4fdce7f33f156c1 Mon Sep 17 00:00:00 2001 From: Swaminathan Balachandran Date: Mon, 3 Jul 2023 14:36:55 -0700 Subject: [PATCH 4/9] HDDS-8970. Fix test failure --- .../hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java index 8a3f124d281e..73714951130a 100644 --- a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java +++ b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java @@ -846,7 +846,7 @@ public void testGenerateDiffReport() throws IOException { actualOrder.add(entry.getType()); long objectId = Long.parseLong( - DFSUtilClient.bytes2String(entry.getSourcePath()).substring(4)); + DFSUtilClient.bytes2String(entry.getSourcePath()).substring(3)); assertEquals(diffMap.get(objectId), entry.getType()); } assertEquals(expectedOrder, actualOrder); From e8b902a6f9fe388fff123b325b770d741c2a9888 Mon Sep 17 00:00:00 2001 From: Swaminathan Balachandran Date: Mon, 3 Jul 2023 14:40:53 -0700 Subject: [PATCH 5/9] HDDS-8970. Fix test failure --- .../org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java index 6f2be4b099a9..55df276cb840 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java @@ -2482,10 +2482,10 @@ public void testSnapshotDiff() throws Exception { Assert.assertEquals(SnapshotDiffReport.DiffType.CREATE, diff.getDiffList().get(1).getType()); Assert.assertArrayEquals( - "/key1".getBytes(StandardCharsets.UTF_8), + "key1".getBytes(StandardCharsets.UTF_8), diff.getDiffList().get(0).getSourcePath()); Assert.assertArrayEquals( - "/key2".getBytes(StandardCharsets.UTF_8), + "key2".getBytes(StandardCharsets.UTF_8), diff.getDiffList().get(1).getSourcePath()); // test whether snapdiff returns aggregated response as From 6848b7f36e1397d4c5b71b4009903ca4b6332c93 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Tue, 4 Jul 2023 07:34:14 -0700 Subject: [PATCH 6/9] Update hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java --- .../test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java index 480cecbe835d..3b8ff848eea0 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java @@ -230,7 +230,7 @@ private void init() throws Exception { // stop the deletion services so that keys can still be read keyManager.stop(); -// preFinalizationChecks(); + preFinalizationChecks(); finalizeOMUpgrade(); counter = new AtomicInteger(); } From 1ce51f722a68f3e7c4822ae0f59e9fb160d13a63 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Tue, 4 Jul 2023 07:34:26 -0700 Subject: [PATCH 7/9] Update hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java --- .../test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java index 3b8ff848eea0..b418490620e4 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java @@ -706,7 +706,7 @@ public void testSnapDiff() throws Exception { SnapshotDiffReport.DiffType.RENAME, key3, renamedKey3), SnapshotDiffReportOzone.getDiffReportEntry( - SnapshotDiffReport.DiffType.MODIFY, key3) + SnapshotDiffReport.DiffType.MODIFY, key3) ); assertEquals(expectedDiffList, diff5.getDiffList()); } From 14d7dec0f5dc7ab639449d7b870d275699c7aa97 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Tue, 4 Jul 2023 07:34:31 -0700 Subject: [PATCH 8/9] Update hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java --- .../test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java index b418490620e4..8df41e405a2a 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java @@ -703,7 +703,7 @@ public void testSnapDiff() throws Exception { diff5 = getSnapDiffReport(volume, bucket, snap6, snap7); List expectedDiffList = Arrays.asList(SnapshotDiffReportOzone.getDiffReportEntry( - SnapshotDiffReport.DiffType.RENAME, key3, + SnapshotDiffReport.DiffType.RENAME, key3, renamedKey3), SnapshotDiffReportOzone.getDiffReportEntry( SnapshotDiffReport.DiffType.MODIFY, key3) From 7ed80d9df438415b79f8205a8400779f998b0e36 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Tue, 4 Jul 2023 07:34:38 -0700 Subject: [PATCH 9/9] Update hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java --- .../test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java index 8df41e405a2a..dd58791c48d8 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java @@ -674,7 +674,7 @@ public void testSnapDiff() throws Exception { Assert.assertEquals(1, diff3.getDiffList().size()); Assert.assertTrue(diff3.getDiffList().contains( SnapshotDiffReportOzone.getDiffReportEntry( - SnapshotDiffReportOzone.DiffType.RENAME, key2, + SnapshotDiffReportOzone.DiffType.RENAME, key2, key2Renamed)));