Class MasterRegionWALRoller
java.lang.Object
java.lang.Thread
org.apache.hadoop.hbase.wal.AbstractWALRoller<Abortable>
org.apache.hadoop.hbase.master.region.MasterRegionWALRoller
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Runnable
As long as there is no RegionServerServices for a master local region, we need implement log
roller logic by our own.
We can reuse most of the code for normal wal roller, the only difference is that there is only
one region, so in
scheduleFlush(String, List)
method we can just schedule flush for the
master local region.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.wal.AbstractWALRoller
AbstractWALRoller.RollController
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private MasterRegionFlusherAndCompactor
private final org.apache.hadoop.fs.FileSystem
private final org.apache.hadoop.fs.Path
private static final org.slf4j.Logger
private final org.apache.hadoop.fs.Path
Fields inherited from class org.apache.hadoop.hbase.wal.AbstractWALRoller
abortable, DEFAULT_WAL_ROLL_WAIT_TIMEOUT, WAL_ROLL_PERIOD_KEY, WAL_ROLL_RETRIES, WAL_ROLL_WAIT_TIMEOUT, wals
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ModifierConstructorDescriptionprivate
MasterRegionWALRoller
(String name, org.apache.hadoop.conf.Configuration conf, Abortable abortable, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path walRootDir, org.apache.hadoop.fs.Path globalWALRootDir, String archivedWALSuffix) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
afterWALArchive
(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) (package private) static MasterRegionWALRoller
create
(String name, org.apache.hadoop.conf.Configuration conf, Abortable abortable, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path walRootDir, org.apache.hadoop.fs.Path globalWALRootDir, String archivedWALSuffix, long rollPeriodMs, long flushSize) protected void
scheduleFlush
(String encodedRegionName, List<byte[]> families) (package private) void
setFlusherAndCompactor
(MasterRegionFlusherAndCompactor flusherAndCompactor) Methods inherited from class org.apache.hadoop.hbase.wal.AbstractWALRoller
addWAL, close, requestRollAll, run, waitUntilWalRollFinished, walRollFinished
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
-
Field Details
-
LOG
-
flusherAndCompactor
-
fs
-
walArchiveDir
-
globalWALArchiveDir
-
archivedWALSuffix
-
-
Constructor Details
-
MasterRegionWALRoller
private MasterRegionWALRoller(String name, org.apache.hadoop.conf.Configuration conf, Abortable abortable, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path walRootDir, org.apache.hadoop.fs.Path globalWALRootDir, String archivedWALSuffix)
-
-
Method Details
-
afterWALArchive
protected void afterWALArchive(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) - Overrides:
afterWALArchive
in classAbstractWALRoller<Abortable>
-
scheduleFlush
- Specified by:
scheduleFlush
in classAbstractWALRoller<Abortable>
- Parameters:
encodedRegionName
- Encoded name of region to flush.families
- stores of region to flush.
-
setFlusherAndCompactor
-
create
static MasterRegionWALRoller create(String name, org.apache.hadoop.conf.Configuration conf, Abortable abortable, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path walRootDir, org.apache.hadoop.fs.Path globalWALRootDir, String archivedWALSuffix, long rollPeriodMs, long flushSize)
-