From c43d660d2bdb00e9a359c24ff33a7a0a55e2c233 Mon Sep 17 00:00:00 2001 From: guluo Date: Wed, 31 May 2023 22:56:57 +0800 Subject: [PATCH] Use parameterised logging and change the log level to WARN --- .../main/java/org/apache/hadoop/hbase/master/HMaster.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 2c4e7d6a5ae..7d06840db1d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -4156,8 +4156,9 @@ public class HMaster extends HBaseServerBase 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) {