busbey commented on a change in pull request #913: HBASE-23381: Improve Logging
in HBase Commons Package
URL: https://github.com/apache/hbase/pull/913#discussion_r356306649
##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java
##########
@@ -151,20 +149,18 @@ public synchronized boolean scheduleChore(ScheduledChore
chore) {
try {
if (chore.getPeriod() <= 0) {
- LOG.info("Chore {} is disabled because its period is not positive.",
chore);
+ LOG.info("Chore {} is disabled because its period is not positive",
chore);
return false;
}
- LOG.info("Chore {} is enabled.", chore);
+ LOG.info("Chore {} is enabled", chore);
chore.setChoreServicer(this);
ScheduledFuture<?> future =
scheduler.scheduleAtFixedRate(chore, chore.getInitialDelay(),
chore.getPeriod(),
chore.getTimeUnit());
scheduledChores.put(chore, future);
return true;
} catch (Exception exception) {
- if (LOG.isInfoEnabled()) {
- LOG.info("Could not successfully schedule chore: " + chore.getName());
- }
+ LOG.info("Could not successfully schedule chore: " + chore.getName());
Review comment:
that's a good catch. This exception handling used to also be used as a
non-error condition way of disabling the chore. agree that now it should
probably call more attention to itself.
----------------------------------------------------------------
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