From 8f402a94e905df3ca521b1790bcd5d567a492505 Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Mon, 26 Jun 2023 14:38:11 -0700 Subject: [PATCH 1/2] HDDS-8935. [Snapshot] Fallback to full diff if getDetlaFiles from compaction DAG fails --- .../rocksdiff/RocksDBCheckpointDiffer.java | 54 +++++++-------- .../hadoop/ozone/om/TestOmSnapshot.java | 41 ++++++++++-- .../hadoop/ozone/om/OmSnapshotManager.java | 7 ++ .../om/snapshot/SnapshotDiffManager.java | 11 +++- .../om/snapshot/TestSnapshotDiffManager.java | 66 +++++++++++++++++-- 5 files changed, 142 insertions(+), 37 deletions(-) diff --git a/hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java b/hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java index 72f837fa85d0..4bac3978d125 100644 --- a/hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java +++ b/hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java @@ -858,27 +858,25 @@ private String getSSTFullPath(String sstFilenameWithoutExtension, * e.g. ["/path/to/sstBackupDir/000050.sst", * "/path/to/sstBackupDir/000060.sst"] */ - public List getSSTDiffListWithFullPath( + public synchronized List getSSTDiffListWithFullPath( DifferSnapshotInfo src, DifferSnapshotInfo dest, String sstFilesDirForSnapDiffJob ) throws IOException { - synchronized (this) { - List sstDiffList = getSSTDiffList(src, dest); - - return sstDiffList.stream() - .map( - sst -> { - String sstFullPath = getSSTFullPath(sst, src.getDbPath()); - Path link = Paths.get(sstFilesDirForSnapDiffJob, - sst + SST_FILE_EXTENSION); - Path srcFile = Paths.get(sstFullPath); - createLink(link, srcFile); - return link.toString(); - }) - .collect(Collectors.toList()); - } + List sstDiffList = getSSTDiffList(src, dest); + + return sstDiffList.stream() + .map( + sst -> { + String sstFullPath = getSSTFullPath(sst, src.getDbPath()); + Path link = Paths.get(sstFilesDirForSnapDiffJob, + sst + SST_FILE_EXTENSION); + Path srcFile = Paths.get(sstFullPath); + createLink(link, srcFile); + return link.toString(); + }) + .collect(Collectors.toList()); } /** @@ -892,8 +890,8 @@ public List getSSTDiffListWithFullPath( * @param dest destination snapshot * @return A list of SST files without extension. e.g. ["000050", "000060"] */ - public List getSSTDiffList(DifferSnapshotInfo src, - DifferSnapshotInfo dest) + public synchronized List getSSTDiffList(DifferSnapshotInfo src, + DifferSnapshotInfo dest) throws IOException { // TODO: Reject or swap if dest is taken after src, once snapshot chain @@ -963,7 +961,7 @@ public void filterRelevantSstFilesFullPath(Set inputFiles, * diffing). Otherwise, add it to the differentFiles map, as it will * need further diffing. */ - void internalGetSSTDiffList( + synchronized void internalGetSSTDiffList( DifferSnapshotInfo src, DifferSnapshotInfo dest, Set srcSnapFiles, Set destSnapFiles, MutableGraph mutableGraph, @@ -1163,6 +1161,9 @@ public void pruneOlderSnapshotsWithCompactionHistory() { Set sstFileNodesRemoved = pruneSstFileNodesFromDag(lastCompactionSstFiles); + + LOG.info("Removing SST files: {} as part of compaction DAG pruning.", + sstFileNodesRemoved); try (BootstrapStateHandler.Lock lock = getBootstrapStateLock().lock()) { removeSstFiles(sstFileNodesRemoved); deleteOlderSnapshotsCompactionFiles(olderSnapshotsLogFilePaths); @@ -1463,14 +1464,15 @@ private SnapshotLogInfo(long snapshotGenerationId, * those are not needed to generate snapshot diff. These files are basically * non-leaf nodes of the DAG. */ - public void pruneSstFiles() { + public synchronized void pruneSstFiles() { Set nonLeafSstFiles; - synchronized (this) { - nonLeafSstFiles = forwardCompactionDAG.nodes().stream() - .filter(node -> !forwardCompactionDAG.successors(node).isEmpty()) - .map(node -> node.getFileName()) - .collect(Collectors.toSet()); - } + nonLeafSstFiles = forwardCompactionDAG.nodes().stream() + .filter(node -> !forwardCompactionDAG.successors(node).isEmpty()) + .map(node -> node.getFileName()) + .collect(Collectors.toSet()); + + LOG.info("Removing SST files: {} as part of SST file pruning.", + nonLeafSstFiles); try (BootstrapStateHandler.Lock lock = getBootstrapStateLock().lock()) { removeSstFiles(nonLeafSstFiles); } catch (InterruptedException e) { 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 2726ecc50645..b0467aaaec72 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 @@ -91,6 +91,7 @@ import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_SNAPSHOT_FORCE_FULL_DIFF; import static org.apache.hadoop.ozone.om.OmSnapshotManager.DELIMITER; import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.CONTAINS_SNAPSHOT; +import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.INTERNAL_ERROR; import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.KEY_NOT_FOUND; import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.NOT_SUPPORTED_OPERATION_PRIOR_FINALIZATION; import static org.apache.hadoop.ozone.om.helpers.BucketLayout.FILE_SYSTEM_OPTIMIZED; @@ -225,7 +226,7 @@ private void init() throws Exception { private static void expectFailurePreFinalization(LambdaTestUtils. VoidCallable eval) throws Exception { - OMException ex = Assert.assertThrows(OMException.class, + OMException ex = assertThrows(OMException.class, () -> eval.call()); Assert.assertEquals(ex.getResult(), NOT_SUPPORTED_OPERATION_PRIOR_FINALIZATION); @@ -795,6 +796,38 @@ private SnapshotDiffReportOzone getSnapDiffReport(String volume, return response.getSnapshotDiffReport(); } + @Test + public void testSnapDiffValidationFailure() throws Exception { + String volume = "vol-" + counter.incrementAndGet(); + String bucket = "buck-" + counter.incrementAndGet(); + store.createVolume(volume); + OzoneVolume volume1 = store.getVolume(volume); + volume1.createBucket(bucket); + OzoneBucket bucket1 = volume1.getBucket(bucket); + // Create Key1 and take snapshot + String key1 = "key-1-"; + createFileKeyWithPrefix(bucket1, key1); + String snap1 = "snap" + counter.incrementAndGet(); + createSnapshot(volume, bucket, snap1); + String snap2 = "snap" + counter.incrementAndGet(); + createSnapshot(volume, bucket, snap2); + + OMException sameSnapshotException = assertThrows(OMException.class, () -> + store.snapshotDiff(volume, bucket, snap1, snap1, null, 0, false, false) + ); + + assertEquals(INTERNAL_ERROR, sameSnapshotException.getResult()); + assertEquals("fromSnapshot:" + snap1 + " and toSnapshot:" + snap1 + + " are same.", sameSnapshotException.getMessage()); + OMException newerSnapshotException = assertThrows(OMException.class, () -> + store.snapshotDiff(volume, bucket, snap2, snap1, null, 0, false, false) + ); + + assertEquals(INTERNAL_ERROR, newerSnapshotException.getResult()); + assertEquals("fromSnapshot:" + snap2 + " should be older than to " + + "toSnapshot:" + snap1, newerSnapshotException.getMessage()); + } + @Test public void testSnapDiffNoSnapshot() throws Exception { String volume = "vol-" + counter.incrementAndGet(); @@ -816,9 +849,9 @@ public void testSnapDiffNoSnapshot() throws Exception { null, 0, false, false)); // From snapshot is invalid LambdaTestUtils.intercept(OMException.class, - "KEY_NOT_FOUND", - () -> store.snapshotDiff(volume, bucket, snap2, snap1, - null, 0, false, false)); + "KEY_NOT_FOUND", + () -> store.snapshotDiff(volume, bucket, snap2, snap1, + null, 0, false, false)); } @Test diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java index c2d662eed50c..2b09eb1b0331 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java @@ -776,6 +776,13 @@ private void validateSnapshotsExistAndActive(final String volumeName, // Block SnapDiff if either of the snapshots is not active. checkSnapshotActive(fromSnapInfo, false); checkSnapshotActive(toSnapInfo, false); + + // Check if fromSnapshot and toSnapshot are equal. + if (Objects.equals(fromSnapInfo, toSnapInfo)) { + throw new IOException("fromSnapshot:" + fromSnapInfo.getName() + + " and toSnapshot:" + toSnapInfo.getName() + " are same."); + } + // Check snapshot creation time if (fromSnapInfo.getCreationTime() > toSnapInfo.getCreationTime()) { throw new IOException("fromSnapshot:" + fromSnapInfo.getName() + 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 ac70c44d567b..628e5d8fdd40 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 @@ -1200,9 +1200,14 @@ Set getDeltaFiles(OmSnapshot fromSnapshot, getDSIFromSI(tsInfo, toSnapshot, volume, bucket); LOG.debug("Calling RocksDBCheckpointDiffer"); - List sstDiffList = - differ.getSSTDiffListWithFullPath(toDSI, fromDSI, diffDir); - deltaFiles.addAll(sstDiffList); + try { + List sstDiffList = + differ.getSSTDiffListWithFullPath(toDSI, fromDSI, diffDir); + deltaFiles.addAll(sstDiffList); + } catch (Exception exception) { + LOG.warn("Failed to get SST diff file using RocksDBCheckpointDiffer. " + + "It will fallback to full diff now.", exception); + } } if (useFullDiff || deltaFiles.isEmpty()) { 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 46f1773f7b63..6e50a6fa799e 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 @@ -96,6 +96,7 @@ import org.rocksdb.RocksIterator; import java.io.File; +import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Files; import java.util.ArrayList; @@ -163,6 +164,7 @@ import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; @@ -459,22 +461,78 @@ public void testGetDeltaFilesWithFullDiff(int numberOfFiles, }); return null; }); - SnapshotDiffManager spy = spy(snapshotDiffManager); UUID snap1 = UUID.randomUUID(); UUID snap2 = UUID.randomUUID(); if (!useFullDiff) { - Set randomStrings = Collections.emptySet(); when(differ.getSSTDiffListWithFullPath( any(DifferSnapshotInfo.class), any(DifferSnapshotInfo.class), anyString())) - .thenReturn(Lists.newArrayList(randomStrings)); + .thenReturn(Collections.emptyList()); } SnapshotInfo fromSnapshotInfo = getMockedSnapshotInfo(snap1); SnapshotInfo toSnapshotInfo = getMockedSnapshotInfo(snap1); when(jobTableIterator.isValid()).thenReturn(false); - Set deltaFiles = spy.getDeltaFiles( + Set deltaFiles = snapshotDiffManager.getDeltaFiles( + snapshotCache.get(snap1.toString()), + snapshotCache.get(snap2.toString()), + Arrays.asList("cf1", "cf2"), + fromSnapshotInfo, + toSnapshotInfo, + false, + Collections.emptyMap(), + Files.createTempDirectory("snapdiff_dir").toAbsolutePath() + .toString()); + assertEquals(deltaStrings, deltaFiles); + } + } + + @ParameterizedTest + @ValueSource(ints = {0, 1, 2, 5, 10, 100, 1000, 10000}) + public void testGetDeltaFilesWithDifferThrowException(int numberOfFiles) + throws ExecutionException, RocksDBException, IOException { + try (MockedStatic mockedRdbUtil = + Mockito.mockStatic(RdbUtil.class); + MockedStatic mockedRocksDiffUtils = + Mockito.mockStatic(RocksDiffUtils.class)) { + Set deltaStrings = new HashSet<>(); + + mockedRdbUtil.when( + () -> RdbUtil.getSSTFilesForComparison(anyString(), anyList())) + .thenAnswer((Answer>) invocation -> { + Set retVal = IntStream.range(0, numberOfFiles) + .mapToObj(i -> RandomStringUtils.randomAlphabetic(10)) + .collect(Collectors.toSet()); + deltaStrings.addAll(retVal); + return retVal; + }); + + mockedRocksDiffUtils.when(() -> + RocksDiffUtils.filterRelevantSstFiles(anySet(), anyMap())) + .thenAnswer((Answer) invocationOnMock -> { + invocationOnMock.getArgument(0, Set.class).stream() + .findAny().ifPresent(val -> { + assertTrue(deltaStrings.contains(val)); + invocationOnMock.getArgument(0, Set.class).remove(val); + deltaStrings.remove(val); + }); + return null; + }); + UUID snap1 = UUID.randomUUID(); + UUID snap2 = UUID.randomUUID(); + + doThrow(new FileNotFoundException("File not found exception.")) + .when(differ) + .getSSTDiffListWithFullPath( + any(DifferSnapshotInfo.class), + any(DifferSnapshotInfo.class), + anyString()); + + SnapshotInfo fromSnapshotInfo = getMockedSnapshotInfo(snap1); + SnapshotInfo toSnapshotInfo = getMockedSnapshotInfo(snap1); + when(jobTableIterator.isValid()).thenReturn(false); + Set deltaFiles = snapshotDiffManager.getDeltaFiles( snapshotCache.get(snap1.toString()), snapshotCache.get(snap2.toString()), Arrays.asList("cf1", "cf2"), From 45b8ba6e50aa1bf0fc87407a7e55a833e7dee15c Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Mon, 26 Jun 2023 15:19:48 -0700 Subject: [PATCH 2/2] Addressed review comments --- .../hadoop/ozone/om/TestOmSnapshot.java | 59 ++++++++----------- .../hadoop/ozone/om/OmSnapshotManager.java | 17 ++++-- .../om/snapshot/SnapshotDiffManager.java | 2 +- 3 files changed, 35 insertions(+), 43 deletions(-) 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 b0467aaaec72..197376867a8e 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 @@ -109,6 +109,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assert.assertThrows; import static java.nio.charset.StandardCharsets.UTF_8; @@ -584,6 +585,12 @@ public void testSnapDiff() throws Exception { key1 = createFileKeyWithPrefix(bucket1, key1); String snap1 = "snap" + counter.incrementAndGet(); createSnapshot(volume, bucket, snap1); + + // When from and to snapshots are same, it returns empty response. + SnapshotDiffReportOzone + diff0 = getSnapDiffReport(volume, bucket, snap1, snap1); + assertTrue(diff0.getDiffList().isEmpty()); + // Do nothing, take another snapshot String snap2 = "snap" + counter.incrementAndGet(); createSnapshot(volume, bucket, snap2); @@ -796,38 +803,6 @@ private SnapshotDiffReportOzone getSnapDiffReport(String volume, return response.getSnapshotDiffReport(); } - @Test - public void testSnapDiffValidationFailure() throws Exception { - String volume = "vol-" + counter.incrementAndGet(); - String bucket = "buck-" + counter.incrementAndGet(); - store.createVolume(volume); - OzoneVolume volume1 = store.getVolume(volume); - volume1.createBucket(bucket); - OzoneBucket bucket1 = volume1.getBucket(bucket); - // Create Key1 and take snapshot - String key1 = "key-1-"; - createFileKeyWithPrefix(bucket1, key1); - String snap1 = "snap" + counter.incrementAndGet(); - createSnapshot(volume, bucket, snap1); - String snap2 = "snap" + counter.incrementAndGet(); - createSnapshot(volume, bucket, snap2); - - OMException sameSnapshotException = assertThrows(OMException.class, () -> - store.snapshotDiff(volume, bucket, snap1, snap1, null, 0, false, false) - ); - - assertEquals(INTERNAL_ERROR, sameSnapshotException.getResult()); - assertEquals("fromSnapshot:" + snap1 + " and toSnapshot:" + snap1 + - " are same.", sameSnapshotException.getMessage()); - OMException newerSnapshotException = assertThrows(OMException.class, () -> - store.snapshotDiff(volume, bucket, snap2, snap1, null, 0, false, false) - ); - - assertEquals(INTERNAL_ERROR, newerSnapshotException.getResult()); - assertEquals("fromSnapshot:" + snap2 + " should be older than to " + - "toSnapshot:" + snap1, newerSnapshotException.getMessage()); - } - @Test public void testSnapDiffNoSnapshot() throws Exception { String volume = "vol-" + counter.incrementAndGet(); @@ -842,16 +817,28 @@ public void testSnapDiffNoSnapshot() throws Exception { String snap1 = "snap" + counter.incrementAndGet(); createSnapshot(volume, bucket, snap1); String snap2 = "snap" + counter.incrementAndGet(); + // Destination snapshot is invalid - LambdaTestUtils.intercept(OMException.class, - "KEY_NOT_FOUND", + OMException omException = assertThrows(OMException.class, () -> store.snapshotDiff(volume, bucket, snap1, snap2, null, 0, false, false)); + assertEquals(KEY_NOT_FOUND, omException.getResult()); // From snapshot is invalid - LambdaTestUtils.intercept(OMException.class, - "KEY_NOT_FOUND", + omException = assertThrows(OMException.class, () -> store.snapshotDiff(volume, bucket, snap2, snap1, null, 0, false, false)); + + assertEquals(KEY_NOT_FOUND, omException.getResult()); + + createSnapshot(volume, bucket, snap2); + + omException = assertThrows(OMException.class, () -> + store.snapshotDiff(volume, bucket, snap2, snap1, null, 0, false, false) + ); + + assertEquals(INTERNAL_ERROR, omException.getResult()); + assertEquals("fromSnapshot:" + snap2 + " should be older than to " + + "toSnapshot:" + snap1, omException.getMessage()); } @Test diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java index 2b09eb1b0331..c1fdbc017209 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java @@ -32,6 +32,7 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Objects; @@ -96,8 +97,10 @@ import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_SNAPSHOT_DIFF_REPORT_MAX_PAGE_SIZE; import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_SNAPSHOT_DIFF_REPORT_MAX_PAGE_SIZE_DEFAULT; import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.INVALID_KEY_NAME; +import static org.apache.hadoop.ozone.om.snapshot.SnapshotDiffManager.getSnapshotRootPath; import static org.apache.hadoop.ozone.om.snapshot.SnapshotUtils.checkSnapshotActive; import static org.apache.hadoop.ozone.om.snapshot.SnapshotUtils.dropColumnFamilyHandle; +import static org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse.JobStatus.DONE; /** * This class is used to manage/create OM snapshots. @@ -711,6 +714,14 @@ public SnapshotDiffResponse getSnapshotDiffReport(final String volume, validateSnapshotsExistAndActive(volume, bucket, fromSnapshot, toSnapshot); + // Check if fromSnapshot and toSnapshot are equal. + if (Objects.equals(fromSnapshot, toSnapshot)) { + SnapshotDiffReportOzone diffReport = new SnapshotDiffReportOzone( + getSnapshotRootPath(volume, bucket).toString(), volume, bucket, + fromSnapshot, toSnapshot, Collections.emptyList(), null); + return new SnapshotDiffResponse(diffReport, DONE, 0L); + } + int index = getIndexFromToken(token); if (pageSize <= 0 || pageSize > maxPageSize) { pageSize = maxPageSize; @@ -777,12 +788,6 @@ private void validateSnapshotsExistAndActive(final String volumeName, checkSnapshotActive(fromSnapInfo, false); checkSnapshotActive(toSnapInfo, false); - // Check if fromSnapshot and toSnapshot are equal. - if (Objects.equals(fromSnapInfo, toSnapInfo)) { - throw new IOException("fromSnapshot:" + fromSnapInfo.getName() + - " and toSnapshot:" + toSnapInfo.getName() + " are same."); - } - // Check snapshot creation time if (fromSnapInfo.getCreationTime() > toSnapInfo.getCreationTime()) { throw new IOException("fromSnapshot:" + fromSnapInfo.getName() + 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 628e5d8fdd40..0905a5c3b78f 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 @@ -555,7 +555,7 @@ public SnapshotDiffResponse getSnapshotDiffReport( } @NotNull - private static OFSPath getSnapshotRootPath(String volume, String bucket) { + public static OFSPath getSnapshotRootPath(String volume, String bucket) { org.apache.hadoop.fs.Path bucketPath = new org.apache.hadoop.fs.Path( OZONE_URI_DELIMITER + volume + OZONE_URI_DELIMITER + bucket); return new OFSPath(bucketPath, new OzoneConfiguration());