HDFS-8659. Block scanner INFO message is spamming logs. Contributed by Yongjun Zhang.
This commit is contained in:
parent
34ee0b9b47
commit
43a1288fff
@ -985,6 +985,8 @@ Release 2.7.2 - UNRELEASED
|
|||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
||||||
|
HDFS-8659. Block scanner INFO message is spamming logs. (Yongjun Zhang)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
@ -317,7 +317,7 @@ synchronized void printStats(StringBuilder p) {
|
|||||||
*/
|
*/
|
||||||
synchronized void markSuspectBlock(String storageId, ExtendedBlock block) {
|
synchronized void markSuspectBlock(String storageId, ExtendedBlock block) {
|
||||||
if (!isEnabled()) {
|
if (!isEnabled()) {
|
||||||
LOG.info("Not scanning suspicious block {} on {}, because the block " +
|
LOG.debug("Not scanning suspicious block {} on {}, because the block " +
|
||||||
"scanner is disabled.", block, storageId);
|
"scanner is disabled.", block, storageId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -656,24 +656,24 @@ public synchronized void shutdown() {
|
|||||||
|
|
||||||
public synchronized void markSuspectBlock(ExtendedBlock block) {
|
public synchronized void markSuspectBlock(ExtendedBlock block) {
|
||||||
if (stopping) {
|
if (stopping) {
|
||||||
LOG.info("{}: Not scheduling suspect block {} for " +
|
LOG.debug("{}: Not scheduling suspect block {} for " +
|
||||||
"rescanning, because this volume scanner is stopping.", this, block);
|
"rescanning, because this volume scanner is stopping.", this, block);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Boolean recent = recentSuspectBlocks.getIfPresent(block);
|
Boolean recent = recentSuspectBlocks.getIfPresent(block);
|
||||||
if (recent != null) {
|
if (recent != null) {
|
||||||
LOG.info("{}: Not scheduling suspect block {} for " +
|
LOG.debug("{}: Not scheduling suspect block {} for " +
|
||||||
"rescanning, because we rescanned it recently.", this, block);
|
"rescanning, because we rescanned it recently.", this, block);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (suspectBlocks.contains(block)) {
|
if (suspectBlocks.contains(block)) {
|
||||||
LOG.info("{}: suspect block {} is already queued for " +
|
LOG.debug("{}: suspect block {} is already queued for " +
|
||||||
"rescanning.", this, block);
|
"rescanning.", this, block);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
suspectBlocks.add(block);
|
suspectBlocks.add(block);
|
||||||
recentSuspectBlocks.put(block, true);
|
recentSuspectBlocks.put(block, true);
|
||||||
LOG.info("{}: Scheduling suspect block {} for rescanning.", this, block);
|
LOG.debug("{}: Scheduling suspect block {} for rescanning.", this, block);
|
||||||
notify(); // wake scanner thread.
|
notify(); // wake scanner thread.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user