Use parameterised logging and change the log level to WARN

This commit is contained in:
guluo 2023-05-31 22:56:57 +08:00
parent 4e393de0a0
commit c43d660d2b
1 changed files with 3 additions and 2 deletions

View File

@ -4156,8 +4156,9 @@ public class HMaster extends HBaseServerBase<MasterRpcServices> implements Maste
}
RegionMetrics regionMetrics = sl.getRegionMetrics().get(regionInfo.getRegionName());
if (regionMetrics == null) {
LOG.error("Can not get compaction details for the region: "
+ regionInfo.getRegionNameAsString() + " , it may be not online.");
LOG.warn(String.format(
"Can not get compaction details for the region: %s , it may be not online.",
regionInfo.getRegionNameAsString()));
continue;
}
if (regionMetrics.getCompactionState() == CompactionState.MAJOR) {