aryangupta1998 commented on code in PR #7314:
URL: https://github.com/apache/ozone/pull/7314#discussion_r1843373638
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/AbstractKeyDeletingService.java:
##########
@@ -449,13 +453,21 @@ public long optimizeDirDeletesAndSubmitRequest(long
remainNum,
deletedDirsCount.addAndGet(dirNum + subdirDelNum);
movedDirsCount.addAndGet(subDirNum - subdirDelNum);
movedFilesCount.addAndGet(subFileNum);
+ long timeTakenInIteration = Time.monotonicNow() - startTime;
LOG.info("Number of dirs deleted: {}, Number of sub-dir " +
"deleted: {}, Number of sub-files moved:" +
" {} to DeletedTable, Number of sub-dirs moved {} to " +
- "DeletedDirectoryTable, iteration elapsed: {}ms," +
+ "DeletedDirectoryTable, limit per iteration: {}, iteration
elapsed: {}ms, " +
" totalRunCount: {}",
- dirNum, subdirDelNum, subFileNum, (subDirNum - subdirDelNum),
- Time.monotonicNow() - startTime, getRunCount());
+ dirNum, subdirDelNum, subFileNum, (subDirNum - subdirDelNum), limit,
+ timeTakenInIteration, getRunCount());
+ if (remainNum <= 0) {
+ LOG.warn("Limit for no. of directory+files that can be deleted in one
iteration is reached. " +
+ "Current limit: {} = {}",
+ OMConfigKeys.OZONE_PATH_DELETING_LIMIT_PER_TASK,
ozoneManager.getConfiguration()
+ .getInt(OMConfigKeys.OZONE_PATH_DELETING_LIMIT_PER_TASK,
+ OMConfigKeys.OZONE_PATH_DELETING_LIMIT_PER_TASK_DEFAULT));
+ }
Review Comment:
This shouldn't be a warn log, we can add it in a debug log and simplify it,
> if (remainNum <= 0 && LOG.isDebugEnabled()) {
LOG.debug(
"Limit for number of directories and files that can be processed
in a deletion interval is reached. Total files and dirs moved: {}",
(subFileNum + subDirNum - subdirDelNum));
}
--
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]