From 1217d574925d71c70bc909b3a293a22b7ee7fd69 Mon Sep 17 00:00:00 2001 From: stack Date: Thu, 9 Jan 2020 15:49:29 -0800 Subject: [PATCH] Revert "HBASE-23668 Master log start filling with "Flush journal status" messages" This reverts commit 1047246717c9d866401938264f3b2c523c3dfd83. Prematurely pushed --- .../store/region/RegionFlusherAndCompactor.java | 15 ++------------- .../store/region/RegionProcedureStore.java | 14 ++++++-------- .../apache/hadoop/hbase/regionserver/HRegion.java | 4 ++-- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionFlusherAndCompactor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionFlusherAndCompactor.java index 5f2ff075f67..53bf66b49df 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionFlusherAndCompactor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionFlusherAndCompactor.java @@ -120,8 +120,6 @@ class RegionFlusherAndCompactor implements Closeable { flushThread.start(); compactExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder() .setNameFormat("Procedure-Region-Store-Compactor").setDaemon(true).build()); - LOG.info("Constructor flushSize={}, flushPerChanges={}, flushIntervalMs={}, " + - "compactMin=", flushSize, flushPerChanges, flushIntervalMs, compactMin); } // inject our flush related configurations @@ -132,8 +130,6 @@ class RegionFlusherAndCompactor implements Closeable { conf.setLong(HRegion.MEMSTORE_FLUSH_PER_CHANGES, flushPerChanges); long flushIntervalMs = conf.getLong(FLUSH_INTERVAL_MS_KEY, DEFAULT_FLUSH_INTERVAL_MS); conf.setLong(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, flushIntervalMs); - LOG.info("Injected flushSize={}, flushPerChanges={}, flushIntervalMs={}", flushSize, - flushPerChanges, flushIntervalMs); } private void compact() { @@ -184,7 +180,6 @@ class RegionFlusherAndCompactor implements Closeable { changesAfterLastFlush.set(0); try { region.flush(true); - lastFlushTime = EnvironmentEdgeManager.currentTime(); } catch (IOException e) { LOG.error(HBaseMarkers.FATAL, "Failed to flush procedure store region, aborting...", e); abortable.abort("Failed to flush procedure store region", e); @@ -212,14 +207,8 @@ class RegionFlusherAndCompactor implements Closeable { } private boolean shouldFlush(long changes) { - boolean flush = region.getMemStoreHeapSize() + region.getMemStoreOffHeapSize() >= flushSize || + return region.getMemStoreHeapSize() + region.getMemStoreOffHeapSize() >= flushSize || changes > flushPerChanges; - if (flush && LOG.isTraceEnabled()) { - LOG.trace("shouldFlush memStoreSize={}, flushSize={}, changes={}, flushPerChanges={}", - region.getMemStoreHeapSize() + region.getMemStoreOffHeapSize(), flushSize, changes, - flushPerChanges); - } - return flush; } void onUpdate() { @@ -248,4 +237,4 @@ class RegionFlusherAndCompactor implements Closeable { flushThread.interrupt(); compactExecutor.shutdown(); } -} +} \ No newline at end of file diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStore.java index be543d03688..05a50592def 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStore.java @@ -306,7 +306,7 @@ public class RegionProcedureStore extends ProcedureStoreBase { if (!fs.exists(procWALDir)) { return; } - LOG.info("The old WALProcedureStore wal directory {} exists, migrating...", procWALDir); + LOG.info("The old procedure wal directory {} exists, start migrating", procWALDir); WALProcedureStore store = new WALProcedureStore(conf, leaseRecovery); store.start(numThreads); store.recoverLease(); @@ -347,7 +347,7 @@ public class RegionProcedureStore extends ProcedureStoreBase { } } }); - LOG.info("The WALProcedureStore max pid is {}, and the max pid of all loaded procedures is {}", + LOG.info("The max pid is {}, and the max pid of all loaded procedures is {}", maxProcIdSet.longValue(), maxProcIdFromProcs.longValue()); // Theoretically, the maxProcIdSet should be greater than or equal to maxProcIdFromProcs, but // anyway, let's do a check here. @@ -358,13 +358,12 @@ public class RegionProcedureStore extends ProcedureStoreBase { PROC_QUALIFIER, EMPTY_BYTE_ARRAY)); } } else if (maxProcIdSet.longValue() < maxProcIdFromProcs.longValue()) { - LOG.warn("The WALProcedureStore max pid is less than the max pid of all loaded procedures"); + LOG.warn("The max pid is less than the max pid of all loaded procedures"); } if (!fs.delete(procWALDir, true)) { - throw new IOException("Failed to delete the WALProcedureStore migrated proc wal directory " + - procWALDir); + throw new IOException("Failed to delete the migrated proc wal directory " + procWALDir); } - LOG.info("Migration of WALProcedureStore finished"); + LOG.info("Migration finished"); } @Override @@ -383,8 +382,7 @@ public class RegionProcedureStore extends ProcedureStoreBase { if (conf.get(USE_HSYNC_KEY) != null) { conf.set(HRegion.WAL_HSYNC_CONF_KEY, conf.get(USE_HSYNC_KEY)); } - conf.setInt(AbstractFSWAL.RING_BUFFER_SLOT_COUNT, - IntMath.ceilingPowerOfTwo(16 * numThreads)); + conf.setInt(AbstractFSWAL.RING_BUFFER_SLOT_COUNT, IntMath.ceilingPowerOfTwo(16 * numThreads)); walRoller = RegionProcedureStoreWALRoller.create(conf, server, fs, rootDir, globalWALRootDir); walRoller.start(); 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 dac034d3be7..a55e2fe069c 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 @@ -2401,7 +2401,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi flushesQueued.reset(); } - status.markComplete("Flush successful " + fs.toString()); + status.markComplete("Flush successful"); return fs; } finally { synchronized (writestate) { @@ -8871,4 +8871,4 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi } } } -} +} \ No newline at end of file