HBASE-7214: CleanerChore logs too much, so much so it obscures all else that is going on

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1414229 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jyates 2012-11-27 15:41:41 +00:00
parent 8e49c2a45d
commit d8ceacc577
2 changed files with 13 additions and 4 deletions

View File

@ -146,7 +146,9 @@ public abstract class CleanerChore<T extends FileCleanerDelegate> extends Chore
* @throws IOException if there is an unexpected filesystem error
*/
private boolean checkAndDeleteDirectory(Path toCheck) throws IOException {
LOG.debug("Checking directory: " + toCheck);
if (LOG.isTraceEnabled()) {
LOG.trace("Checking directory: " + toCheck);
}
FileStatus[] children = FSUtils.listStatus(fs, toCheck);
// if the directory doesn't exist, then we are done
if (children == null) return true;
@ -200,12 +202,16 @@ public abstract class CleanerChore<T extends FileCleanerDelegate> extends Chore
if (!cleaner.isFileDeletable(filePath)) {
// this file is not deletable, then we are done
LOG.debug(filePath + " is not deletable according to:" + cleaner);
if (LOG.isTraceEnabled()) {
LOG.trace(filePath + " is not deletable according to:" + cleaner);
}
return false;
}
}
// delete this file if it passes all the cleaners
LOG.debug("Removing: " + filePath + " from archive");
if (LOG.isTraceEnabled()) {
LOG.trace("Removing: " + filePath + " from archive");
}
boolean success = this.fs.delete(filePath, false);
if (!success) {
LOG.warn("Attempted to delete:" + filePath

View File

@ -65,7 +65,10 @@ public class TimeToLiveHFileCleaner extends BaseHFileCleanerDelegate {
return false;
}
long life = currentTime - time;
LOG.debug("Life:" + life + ", ttl:" + ttl + ", current:" + currentTime + ", from: " + time);
if (LOG.isTraceEnabled()) {
LOG.trace("HFile life:" + life + ", ttl:" + ttl + ", current:" + currentTime + ", from: "
+ time);
}
if (life < 0) {
LOG.warn("Found a log (" + filePath + ") newer than current time (" + currentTime + " < "
+ time + "), probably a clock skew");