|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@InterfaceAudience.Private public interface HLog
| Nested Class Summary | |
|---|---|
static class |
HLog.Entry
Utility class that lets us keep track of the edit with it's key Only used when splitting logs |
static interface |
HLog.Reader
|
static interface |
HLog.Writer
|
| Field Summary | |
|---|---|
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 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. |
| Method Summary | |
|---|---|
void |
abortCacheFlush(byte[] encodedRegionName)
Abort a cache flush. |
void |
append(HRegionInfo info,
byte[] tableName,
WALEdit edits,
long now,
HTableDescriptor htd)
Same as appendNoSync(HRegionInfo, byte[], WALEdit, UUID, long, HTableDescriptor),
except it causes a sync on the log |
void |
append(HRegionInfo info,
byte[] tableName,
WALEdit edits,
long now,
HTableDescriptor htd,
boolean isInMemstore)
Append a set of edits to the log. |
long |
appendNoSync(HRegionInfo info,
byte[] tableName,
WALEdit edits,
UUID clusterId,
long now,
HTableDescriptor htd)
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 |
getSequenceNumber()
|
void |
hflush()
|
void |
hsync()
|
boolean |
isLowReplicationRollEnabled()
Get LowReplication-Roller status |
long |
obtainSeqNum()
Obtain a log sequence number. |
void |
registerWALActionsListener(WALActionsListener listener)
registers WALActionsListener |
byte[][] |
rollWriter()
Roll the log writer. |
byte[][] |
rollWriter(boolean force)
Roll the log writer. |
void |
setSequenceNumber(long newvalue)
Called by HRegionServer when it opens a new region to ensure that log sequence numbers are always greater than the latest sequence number of the region being brought on-line. |
Long |
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 |
| Field Detail |
|---|
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
| Method Detail |
|---|
void registerWALActionsListener(WALActionsListener listener)
listener - boolean unregisterWALActionsListener(WALActionsListener listener)
listener - long getFilenum()
void setSequenceNumber(long newvalue)
newvalue - We'll set log edit/sequence number to this value if it is greater
than the current value.long getSequenceNumber()
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 writer
HRegionInfo.getEncodedName()
FailedLogCloseException
IOException
void close()
throws IOException
IOException
void closeAndDelete()
throws IOException
IOException
void append(HRegionInfo info,
byte[] tableName,
WALEdit edits,
long now,
HTableDescriptor htd)
throws IOException
appendNoSync(HRegionInfo, byte[], WALEdit, UUID, long, HTableDescriptor),
except it causes a sync on the log
IOException
void append(HRegionInfo info,
byte[] tableName,
WALEdit edits,
long now,
HTableDescriptor htd,
boolean isInMemstore)
throws IOException
info - tableName - edits - now - htd - isInMemstore - Whether the record is in memstore. False for system records.
IOException
long appendNoSync(HRegionInfo info,
byte[] tableName,
WALEdit edits,
UUID clusterId,
long now,
HTableDescriptor htd)
throws IOException
info - tableName - edits - clusterId - The originating clusterId for this edit (for replication)now - htd -
IOException
void hsync()
throws IOException
IOException
void hflush()
throws IOException
IOException
void sync()
throws IOException
IOException
void sync(long txid)
throws IOException
IOExceptionlong obtainSeqNum()
Long startCacheFlush(byte[] encodedRegionName)
append(HRegionInfo, byte[], WALEdit, long, HTableDescriptor)
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||