Ethanlm commented on a change in pull request #3040: Storm 3423 improve
logviewer directory cleaner logging
URL: https://github.com/apache/storm/pull/3040#discussion_r298652443
##########
File path:
storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/utils/DirectoryCleaner.java
##########
@@ -162,14 +162,15 @@ public DeletionMeta deleteOldestWhileTooLarge(List<Path>
dirs,
+ "a single directory : {}, will delete the
rest files in next interval.",
MAX_ROUNDS,
dirs.get(0).toAbsolutePath().normalize());
} else {
- LOG.warn("Reach the MAX_ROUNDS: {} during global
deletion, you may have too many files, "
- + "will delete the rest files in next interval.",
MAX_ROUNDS);
+ LOG.warn("Reach the MAX_ROUNDS: {} during global
deletion, you may have too many files in log root directory, "
+ + "will delete the rest files in next
interval.", MAX_ROUNDS);
}
break;
}
} else {
- LOG.warn("No more files able to delete this round, but {} is
over quota by {} MB",
- forPerDir ? "this directory" : "root directory",
toDeleteSize * 1e-6);
+ LOG.warn("No more files eligible to be deleted this round, but
{} is over {} quota by {} MB",
+ forPerDir ? "worker directory: " +
dirs.get(0).toAbsolutePath().normalize() : "log root directory: " +
dirs.get(0).getParent().getParent().toAbsolutePath().normalize(),
Review comment:
I am a little nervous about
`dirs.get(0).getParent().getParent().toAbsolutePath()`. Potentially it will
throw NPE. We can remove it. `log root directory` here should suffice
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services