@InterfaceAudience.Private public class WALUtil extends Object
WAL
.Constructor and Description |
---|
WALUtil() |
Modifier and Type | Method and Description |
---|---|
static long |
writeBulkLoadMarkerAndSync(WAL wal,
HTableDescriptor htd,
HRegionInfo info,
WALProtos.BulkLoadDescriptor descriptor,
AtomicLong sequenceId)
Write a log marker that a bulk load has succeeded and is about to be committed.
|
static void |
writeCompactionMarker(WAL log,
HTableDescriptor htd,
HRegionInfo info,
WALProtos.CompactionDescriptor c,
AtomicLong sequenceId)
Write the marker that a compaction has succeeded and is about to be committed.
|
static long |
writeFlushMarker(WAL log,
HTableDescriptor htd,
HRegionInfo info,
WALProtos.FlushDescriptor f,
AtomicLong sequenceId,
boolean sync)
Write a flush marker indicating a start / abort or a complete of a region flush
|
static long |
writeRegionEventMarker(WAL log,
HTableDescriptor htd,
HRegionInfo info,
WALProtos.RegionEventDescriptor r,
AtomicLong sequenceId)
Write a region open marker indicating that the region is opened
|
public static void writeCompactionMarker(WAL log, HTableDescriptor htd, HRegionInfo info, WALProtos.CompactionDescriptor c, AtomicLong sequenceId) throws IOException
sequenceId
- Used by WAL to get sequence Id for the waledit.IOException
public static long writeFlushMarker(WAL log, HTableDescriptor htd, HRegionInfo info, WALProtos.FlushDescriptor f, AtomicLong sequenceId, boolean sync) throws IOException
IOException
public static long writeRegionEventMarker(WAL log, HTableDescriptor htd, HRegionInfo info, WALProtos.RegionEventDescriptor r, AtomicLong sequenceId) throws IOException
IOException
public static long writeBulkLoadMarkerAndSync(WAL wal, HTableDescriptor htd, HRegionInfo info, WALProtos.BulkLoadDescriptor descriptor, AtomicLong sequenceId) throws IOException
wal
- The log to write into.htd
- A description of the table that we are bulk loading into.info
- A description of the region in the table that we are bulk loading into.descriptor
- A protocol buffers based description of the client's bulk loading requestsequenceId
- The current sequenceId in the log at the time when we were to write the
bulk load marker.IOException
- We will throw an IOException if we can not append to the HLog.Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.