@InterfaceAudience.Private public interface HLog
Modifier and Type | Interface and Description |
---|---|
static class |
HLog.Entry
Utility class that lets us keep track of the edit with it's key.
|
static interface |
HLog.Reader |
static interface |
HLog.Writer |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_WAL_TRAILER_WARN_SIZE |
static Pattern |
EDITFILES_NAME_PATTERN |
static org.apache.commons.logging.Log |
LOG |
static String |
META_HLOG_FILE_EXTN
The hbase:meta region's HLog filename extension
|
static String |
RECOVERED_LOG_TMPFILE_SUFFIX |
static boolean |
SPLIT_SKIP_ERRORS_DEFAULT |
static String |
SPLITTING_EXT
File Extension used while splitting an HLog into regions (HBASE-2312)
|
static String |
WAL_TRAILER_WARN_SIZE
Configuration name of HLog Trailer's warning size.
|
Modifier and Type | Method and Description |
---|---|
void |
abortCacheFlush(byte[] encodedRegionName)
Abort a cache flush.
|
void |
append(HRegionInfo info,
TableName tableName,
WALEdit edits,
long now,
HTableDescriptor htd,
AtomicLong sequenceId)
Same as appendNoSync(HRegionInfo, TableName, WALEdit, List, long, HTableDescriptor),
except it causes a sync on the log
|
long |
appendNoSync(HRegionInfo info,
TableName tableName,
WALEdit edits,
List<UUID> clusterIds,
long now,
HTableDescriptor htd,
AtomicLong sequenceId,
boolean isInMemstore,
long nonceGroup,
long nonce)
Append a set of edits to the log.
|
void |
close()
Shut down the log.
|
void |
closeAndDelete()
Shut down the log and delete the log directory
|
void |
completeCacheFlush(byte[] encodedRegionName)
Complete the cache flush.
|
WALCoprocessorHost |
getCoprocessorHost() |
long |
getEarliestMemstoreSeqNum(byte[] encodedRegionName)
Gets the earliest sequence number in the memstore for this particular region.
|
long |
getFilenum() |
long |
getLogFileSize() |
int |
getNumLogFiles() |
void |
hflush() |
void |
hsync() |
boolean |
isLowReplicationRollEnabled()
Get LowReplication-Roller status
|
void |
postAppend(List<HLog.Entry> entries)
For notification post append to the writer.
|
void |
postSync()
For notification post writer sync.
|
void |
registerWALActionsListener(WALActionsListener listener)
registers WALActionsListener
|
byte[][] |
rollWriter()
Roll the log writer.
|
byte[][] |
rollWriter(boolean force)
Roll the log writer.
|
boolean |
startCacheFlush(byte[] encodedRegionName)
WAL keeps track of the sequence numbers that were not yet flushed from memstores
in order to be able to do cleanup.
|
void |
sync() |
void |
sync(long txid) |
boolean |
unregisterWALActionsListener(WALActionsListener listener)
unregisters WALActionsListener
|
static final org.apache.commons.logging.Log LOG
static final String SPLITTING_EXT
static final boolean SPLIT_SKIP_ERRORS_DEFAULT
static final String META_HLOG_FILE_EXTN
static final String WAL_TRAILER_WARN_SIZE
static final int DEFAULT_WAL_TRAILER_WARN_SIZE
static final Pattern EDITFILES_NAME_PATTERN
static final String RECOVERED_LOG_TMPFILE_SUFFIX
void registerWALActionsListener(WALActionsListener listener)
listener
- boolean unregisterWALActionsListener(WALActionsListener listener)
listener
- long getFilenum()
int getNumLogFiles()
long getLogFileSize()
byte[][] rollWriter() throws FailedLogCloseException, IOException
The implementation is synchronized in order to make sure there's one rollWriter running at any given time.
HRegionInfo.getEncodedName()
FailedLogCloseException
IOException
byte[][] rollWriter(boolean force) throws FailedLogCloseException, IOException
The implementation is synchronized in order to make sure there's one rollWriter running at any given time.
force
- If true, force creation of a new writer even if no entries have
been written to the current writerHRegionInfo.getEncodedName()
FailedLogCloseException
IOException
void close() throws IOException
IOException
void closeAndDelete() throws IOException
IOException
void append(HRegionInfo info, TableName tableName, WALEdit edits, long now, HTableDescriptor htd, AtomicLong sequenceId) throws IOException
sequenceId
- of the region.IOException
void postAppend(List<HLog.Entry> entries)
entries
- void postSync()
long appendNoSync(HRegionInfo info, TableName tableName, WALEdit edits, List<UUID> clusterIds, long now, HTableDescriptor htd, AtomicLong sequenceId, boolean isInMemstore, long nonceGroup, long nonce) throws IOException
info
- tableName
- edits
- clusterIds
- The clusters that have consumed the change (for replication)now
- htd
- sequenceId
- of the regionIOException
void hsync() throws IOException
IOException
void hflush() throws IOException
IOException
void sync() throws IOException
IOException
void sync(long txid) throws IOException
IOException
boolean startCacheFlush(byte[] encodedRegionName)
append(HRegionInfo, TableName, WALEdit, long, HTableDescriptor,
AtomicLong)
as new oldest seqnum.
In case of flush being aborted, we put the stashed value back; in case of flush succeeding,
the seqNum of that first edit after start becomes the valid oldest seqNum for this region.void completeCacheFlush(byte[] encodedRegionName)
encodedRegionName
- Encoded region name.void abortCacheFlush(byte[] encodedRegionName)
encodedRegionName
- Encoded region name.WALCoprocessorHost getCoprocessorHost()
boolean isLowReplicationRollEnabled()
long getEarliestMemstoreSeqNum(byte[] encodedRegionName)
encodedRegionName
- The region to get the number for.Copyright © 2014 The Apache Software Foundation. All rights reserved.