sadanand48 commented on code in PR #8477:
URL: https://github.com/apache/ozone/pull/8477#discussion_r2149927449
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServlet.java:
##########
@@ -334,28 +327,13 @@ private boolean getFilesForArchive(DBCheckpoint
checkpoint,
compactionLogDir.getOriginalDir().toPath());
}
- private void logEstimatedTarballSize(
- DBCheckpoint checkpoint, boolean includeSnapshotData) {
- try {
- Counters.PathCounters counters = Counters.longPathCounters();
- CountingPathVisitor visitor = new CountingPathVisitor(
- counters, SST_FILE_FILTER, TRUE);
- Files.walkFileTree(checkpoint.getCheckpointLocation(), visitor);
- int totalSnapshots = 0;
- if (includeSnapshotData) {
- Set<Path> snapshotPaths = getSnapshotDirs(checkpoint, false);
- totalSnapshots = snapshotPaths.size();
- for (Path snapshotDir: snapshotPaths) {
- Files.walkFileTree(snapshotDir, visitor);
- }
- }
- LOG.info("Estimates for Checkpoint Tarball Stream - Data size: {} KB, "
+ "SST files: {}{}",
- counters.getByteCounter().get() / (1024),
- counters.getFileCounter().get(),
- (includeSnapshotData ? ", snapshots: " + totalSnapshots : ""));
- } catch (Exception e) {
- LOG.error("Could not estimate size of transfer to Checkpoint Tarball
Stream.", e);
+ private void logEstimatedTarballSize(DBCheckpoint checkpoint, boolean
includeSnapshotData)
+ throws IOException {
+ Set<Path> snapshotPaths = new HashSet<>();
+ if (includeSnapshotData) {
+ snapshotPaths = getSnapshotDirs(checkpoint, true);
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]