devmadhuu commented on code in PR #5620:
URL: https://github.com/apache/ozone/pull/5620#discussion_r1409501983
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthTask.java:
##########
@@ -320,9 +325,29 @@ public static List<UnhealthyContainers>
generateUnhealthyRecords(
if (container.isMissing()
&& !recordForStateExists.contains(
- UnHealthyContainerStates.MISSING.toString())) {
- records.add(
- recordForState(container, UnHealthyContainerStates.MISSING, time));
+ UnHealthyContainerStates.MISSING.toString())) {
+ if (!container.isEmpty()) {
+ LOG.info("Container is missing but not empty, mapped with {} " +
+ "number of keys and having {} usedBytes in SCM metadata. " +
+ "For all OM keys mapped to this container, pls check the " +
+ "missing container page in Recon which shows all the keys " +
+ "and their metadata.", container.getNumKeys(),
+ container.getContainer().getUsedBytes());
+ records.add(
+ recordForState(container, UnHealthyContainerStates.MISSING,
+ time));
+ } else {
+ // If the container is empty and has no replicas, it is possible it
+ // was a container which stuck in the closing state which never got
+ // any replicas created on the datanodes. In this case, we log it as
+ // EMPTY, and insert as EMPTY_MISSING in UNHEALTHY_CONTAINERS table.
+ LOG.info("Container is missing as well as empty, mapped with {} " +
Review Comment:
Thanks @swagle for your review. I have grouped the container stats for
logging instead of logging for each container Id.
--
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]