Package org.apache.hadoop.hbase.wal
Class IOTestProvider.IOTestWAL
java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL<org.apache.hadoop.hbase.wal.WALProvider.Writer>
org.apache.hadoop.hbase.regionserver.wal.FSHLog
org.apache.hadoop.hbase.wal.IOTestProvider.IOTestWAL
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.hadoop.hbase.replication.regionserver.WALFileLengthProvider
,org.apache.hadoop.hbase.wal.WAL
- Enclosing class:
- IOTestProvider
private static class IOTestProvider.IOTestWAL
extends org.apache.hadoop.hbase.regionserver.wal.FSHLog
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.wal.WAL
org.apache.hadoop.hbase.wal.WAL.Entry
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private final boolean
private org.apache.hadoop.hbase.wal.WALProvider.Writer
Fields inherited from class org.apache.hadoop.hbase.regionserver.wal.FSHLog
FIXED_OVERHEAD
Fields inherited from class org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL
abortable, blocksize, closed, closeExecutor, conf, coprocessorHost, DEFAULT_ROLL_ON_SYNC_TIME_MS, DEFAULT_SLOW_SYNC_ROLL_INTERVAL_MS, DEFAULT_SLOW_SYNC_ROLL_THRESHOLD, DEFAULT_SLOW_SYNC_TIME_MS, DEFAULT_WAL_SHUTDOWN_WAIT_TIMEOUT_MS, DEFAULT_WAL_SYNC_TIMEOUT_MS, filenum, fs, highestSyncedTxid, highestUnsyncedTxid, implClassName, inflightWALClosures, listeners, logrollsize, MAX_LOGS, maxLogs, numEntries, ourFiles, prefixPathStr, RING_BUFFER_SLOT_COUNT, ROLL_ON_SYNC_TIME_MS, rollOnSyncNs, rollRequested, rollWriterLock, sequenceIdAccounting, shutdown, SLOW_SYNC_ROLL_INTERVAL_MS, SLOW_SYNC_ROLL_THRESHOLD, SLOW_SYNC_TIME_MS, slowSyncCheckInterval, slowSyncCount, slowSyncNs, slowSyncRollThreshold, syncFutureCache, totalLogSize, useHsync, WAL_AVOID_LOCAL_WRITES_DEFAULT, WAL_AVOID_LOCAL_WRITES_KEY, WAL_ROLL_MULTIPLIER, WAL_SHUTDOWN_WAIT_TIMEOUT_MS, WAL_SYNC_TIMEOUT_MS, walArchiveDir, walDir, walFile2Props, walFilePrefix, walFileSuffix, walShutdownTimeout
-
Constructor Summary
ConstructorDescriptionIOTestWAL
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, String logDir, String archiveDir, org.apache.hadoop.conf.Configuration conf, List<org.apache.hadoop.hbase.regionserver.wal.WALActionsListener> listeners, boolean failIfWALExists, String prefix, String suffix) Create an edit log at the givendir
location. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.hadoop.hbase.wal.WALProvider.Writer
createWriterInstance
(org.apache.hadoop.fs.Path path) Methods inherited from class org.apache.hadoop.hbase.regionserver.wal.FSHLog
afterCreatingZigZagLatch, append, beforeWaitOnSafePoint, doAppend, doCheckLogLowReplication, doReplaceWriter, doShutdown, doSync, doSync, getSequenceOnRingBuffer, publishSyncOnRingBuffer
Methods inherited from class org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL
abortCacheFlush, appendData, appendEntry, appendMarker, archive, archiveLogFile, atHeadOfRingBufferEventHandlerAppend, blockOnSync, checkLogLowReplication, close, completeCacheFlush, computeFilename, doCheckSlowSync, getCoprocessorHost, getCurrentFileName, getEarliestMemStoreSeqNum, getEarliestMemStoreSeqNum, getFilenum, getFileNumFromFileName, getInflightWALCloseCount, getLogFileSize, getLogFileSizeIfBeingWritten, getNumLogFiles, getNumRolledLogFiles, getOldPath, getPreallocatedEventCount, getSyncFuture, getWALArchivePath, init, isLogRollRequested, logRollAndSetupWalProps, main, markClosedAndClean, postSync, registerWALActionsListener, requestLogRoll, requestLogRoll, rollWriter, rollWriter, shutdown, stampSequenceIdAndPublishToRingBuffer, startCacheFlush, startCacheFlush, sync, sync, sync, sync, toString, unregisterWALActionsListener, updateStore
-
Field Details
-
doFileRolls
-
initialized
-
noRollsWriter
-
-
Constructor Details
-
IOTestWAL
public IOTestWAL(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, String logDir, String archiveDir, org.apache.hadoop.conf.Configuration conf, List<org.apache.hadoop.hbase.regionserver.wal.WALActionsListener> listeners, boolean failIfWALExists, String prefix, String suffix) throws IOException Create an edit log at the givendir
location. You should never have to load an existing log. If there is a log at startup, it should have already been processed and deleted by the time the WAL object is started up.- Parameters:
fs
- filesystem handlerootDir
- path to where logs and oldlogslogDir
- dir where wals are storedarchiveDir
- dir where wals are archivedconf
- configuration to uselisteners
- Listeners on WAL events. Listeners passed here will be registered before we do anything else; e.g. the ConstructorAbstractFSWAL.rollWriter()
.failIfWALExists
- If true IOException will be thrown if files related to this wal already exist.prefix
- should always be hostname and port in distributed env and it will be URL encoded before being used. If prefix is null, "wal" will be usedsuffix
- will be url encoded. null is treated as empty. non-empty must start withAbstractFSWALProvider.WAL_FILE_NAME_DELIMITER
- Throws:
IOException
-
-
Method Details
-
createWriterInstance
protected org.apache.hadoop.hbase.wal.WALProvider.Writer createWriterInstance(org.apache.hadoop.fs.Path path) throws IOException - Overrides:
createWriterInstance
in classorg.apache.hadoop.hbase.regionserver.wal.FSHLog
- Throws:
IOException
-