HBASE-26430 Increase log level in DefaultHeapMemoryTuner from DEBUG to INFO (#3820)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
Andrew Purtell 2021-11-08 18:34:14 -08:00 committed by GitHub
parent b03ed8bae0
commit 407a5bd812
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 2 deletions

View File

@ -135,6 +135,8 @@ class DefaultHeapMemoryTuner implements HeapMemoryTuner {
// Ignoring the first few tuner periods // Ignoring the first few tuner periods
ignoreInitialPeriods++; ignoreInitialPeriods++;
rollingStatsForTunerSteps.insertDataValue(0); rollingStatsForTunerSteps.insertDataValue(0);
LOG.info("Ignoring initial tuning periods: {} so far, {} to ignore", ignoreInitialPeriods,
numPeriodsToIgnore);
return NO_OP_TUNER_RESULT; return NO_OP_TUNER_RESULT;
} }
StepDirection newTuneDirection = getTuneDirection(context); StepDirection newTuneDirection = getTuneDirection(context);
@ -252,12 +254,15 @@ class DefaultHeapMemoryTuner implements HeapMemoryTuner {
if (earlyMemstoreSufficientCheck && earlyBlockCacheSufficientCheck) { if (earlyMemstoreSufficientCheck && earlyBlockCacheSufficientCheck) {
// Both memstore and block cache memory seems to be sufficient. No operation required. // Both memstore and block cache memory seems to be sufficient. No operation required.
newTuneDirection = StepDirection.NEUTRAL; newTuneDirection = StepDirection.NEUTRAL;
tunerLog.append("Going to do nothing because no changes are needed.");
} else if (earlyMemstoreSufficientCheck) { } else if (earlyMemstoreSufficientCheck) {
// Increase the block cache size and corresponding decrease in memstore size. // Increase the block cache size and corresponding decrease in memstore size.
newTuneDirection = StepDirection.INCREASE_BLOCK_CACHE_SIZE; newTuneDirection = StepDirection.INCREASE_BLOCK_CACHE_SIZE;
tunerLog.append("Going to increase the block cache size.");
} else if (earlyBlockCacheSufficientCheck) { } else if (earlyBlockCacheSufficientCheck) {
// Increase the memstore size and corresponding decrease in block cache size. // Increase the memstore size and corresponding decrease in block cache size.
newTuneDirection = StepDirection.INCREASE_MEMSTORE_SIZE; newTuneDirection = StepDirection.INCREASE_MEMSTORE_SIZE;
tunerLog.append("Going to increase the memstore size.");
} else { } else {
// Early checks for sufficient memory failed. Tuning memory based on past statistics. // Early checks for sufficient memory failed. Tuning memory based on past statistics.
// Boolean indicator to show if we need to revert previous step or not. // Boolean indicator to show if we need to revert previous step or not.
@ -347,8 +352,17 @@ class DefaultHeapMemoryTuner implements HeapMemoryTuner {
} }
} }
} }
if (LOG.isDebugEnabled()) { // Log NEUTRAL decisions at DEBUG, because they are the most frequent and not that interesting.
LOG.debug(tunerLog.toString()); // Log other decisions at INFO because they are making meaningful operational changes.
switch (newTuneDirection) {
case NEUTRAL:
if (LOG.isDebugEnabled()) {
LOG.debug(tunerLog.toString());
}
break;
default:
LOG.info(tunerLog.toString());
break;
} }
return newTuneDirection; return newTuneDirection;
} }