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.RollControllerNested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate MasterRegionFlusherAndCompactorprivate final org.apache.hadoop.fs.FileSystemprivate final org.apache.hadoop.fs.Pathprivate static final org.slf4j.Loggerprivate final org.apache.hadoop.fs.PathFields 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, walsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMasterRegionWALRoller(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 voidafterWALArchive(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) (package private) static MasterRegionWALRollercreate(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 voidscheduleFlush(String encodedRegionName, List<byte[]> families) (package private) voidsetFlusherAndCompactor(MasterRegionFlusherAndCompactor flusherAndCompactor) Methods inherited from class org.apache.hadoop.hbase.wal.AbstractWALRoller
addWAL, close, requestRollAll, run, waitUntilWalRollFinished, walRollFinishedMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, 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:
afterWALArchivein classAbstractWALRoller<Abortable>
-
scheduleFlush
- Specified by:
scheduleFlushin 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)
-