Skip to content

Commit

Permalink
HBASE-26430 Increase log level in DefaultHeapMemoryTuner from DEBUG t…
Browse files Browse the repository at this point in the history
…o INFO (#3820)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
  • Loading branch information
apurtell committed Nov 9, 2021
1 parent 201b3c7 commit 1302073
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public TunerResult tune(TunerContext context) {
// Ignoring the first few tuner periods
ignoreInitialPeriods++;
rollingStatsForTunerSteps.insertDataValue(0);
LOG.info("Ignoring initial tuning periods: {} so far, {} to ignore", ignoreInitialPeriods,
numPeriodsToIgnore);
return NO_OP_TUNER_RESULT;
}
StepDirection newTuneDirection = getTuneDirection(context);
Expand Down Expand Up @@ -252,12 +254,15 @@ private StepDirection getTuneDirection(TunerContext context) {
if (earlyMemstoreSufficientCheck && earlyBlockCacheSufficientCheck) {
// Both memstore and block cache memory seems to be sufficient. No operation required.
newTuneDirection = StepDirection.NEUTRAL;
tunerLog.append("Going to do nothing because no changes are needed.");
} else if (earlyMemstoreSufficientCheck) {
// Increase the block cache size and corresponding decrease in memstore size.
newTuneDirection = StepDirection.INCREASE_BLOCK_CACHE_SIZE;
tunerLog.append("Going to increase the block cache size.");
} else if (earlyBlockCacheSufficientCheck) {
// Increase the memstore size and corresponding decrease in block cache size.
newTuneDirection = StepDirection.INCREASE_MEMSTORE_SIZE;
tunerLog.append("Going to increase the memstore size.");
} else {
// 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.
Expand Down Expand Up @@ -347,8 +352,17 @@ private StepDirection getTuneDirection(TunerContext context) {
}
}
}
if (LOG.isDebugEnabled()) {
LOG.debug(tunerLog.toString());
// Log NEUTRAL decisions at DEBUG, because they are the most frequent and not that interesting.
// 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;
}
Expand Down

0 comments on commit 1302073

Please sign in to comment.