From ab1f8deb2f1c9fbe46934a4b23f5f298770d9de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Lipt=C3=A1k?= Date: Wed, 19 Aug 2015 21:41:05 -0400 Subject: [PATCH] HBASE-14256 Correct confusing flush task message --- .../java/org/apache/hadoop/hbase/regionserver/HRegion.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index df8bcf5..86a2f3e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -1174,11 +1174,12 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi // force a flush only if region replication is set up for this region. Otherwise no need. boolean forceFlush = getTableDesc().getRegionReplication() > 1; - // force a flush first - MonitoredTask status = TaskMonitor.get().createStatus( - "Flushing region " + this + " because recovery is finished"); + MonitoredTask status = TaskMonitor.get().createStatus("Recovering region " + this); + try { + // force a flush first if (forceFlush) { + status.setStatus("Flushing region " + this + " because recovery is finished"); internalFlushcache(status); } @@ -1194,13 +1195,13 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi // We cannot rethrow this exception since we are being called from the zk thread. The // region has already opened. In this case we log the error, but continue LOG.warn(getRegionInfo().getEncodedName() + " : was not able to write region opening " - + "event to WAL, continueing", e); + + "event to WAL, continuing", e); } } catch (IOException ioe) { // Distributed log replay semantics does not necessarily require a flush, since the replayed // data is already written again in the WAL. So failed flush should be fine. LOG.warn(getRegionInfo().getEncodedName() + " : was not able to flush " - + "event to WAL, continueing", ioe); + + "event to WAL, continuing", ioe); } finally { status.cleanup(); } -- 2.1.4