@InterfaceAudience.LimitedPrivate(value={"Replication","Coprocesssor"}) public class WALEdit extends Object implements org.apache.hadoop.io.Writable, HeapSize
Modifier and Type | Field and Description |
---|---|
static byte[] |
BULK_LOAD |
static WALEdit |
EMPTY_WALEDIT |
static org.apache.commons.logging.Log |
LOG |
static byte[] |
METAFAMILY |
public static final org.apache.commons.logging.Log LOG
public static final byte[] METAFAMILY
public static final byte[] BULK_LOAD
public static final WALEdit EMPTY_WALEDIT
public static boolean isMetaEditFamily(byte[] f)
f
- f
is METAFAMILY
public static boolean isMetaEditFamily(Cell cell)
public boolean isMetaEdit()
public boolean isReplay()
public void setCompressionContext(CompressionContext compressionContext)
public boolean isEmpty()
public int size()
public NavigableMap<byte[],Integer> getAndRemoveScopes()
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public int readFromCells(Codec.Decoder cellDecoder, int expectedCount) throws IOException
cellDecoder
- Cell decoder.expectedCount
- Expected cell count.IOException
public long heapSize()
public static WALEdit createFlushWALEdit(HRegionInfo hri, WALProtos.FlushDescriptor f)
public static WALProtos.FlushDescriptor getFlushDescriptor(Cell cell) throws IOException
IOException
public static WALEdit createRegionEventWALEdit(HRegionInfo hri, WALProtos.RegionEventDescriptor regionEventDesc)
public static WALProtos.RegionEventDescriptor getRegionEventDescriptor(Cell cell) throws IOException
IOException
public static WALEdit createCompaction(HRegionInfo hri, WALProtos.CompactionDescriptor c)
c
- c
serialized as its valuepublic static WALProtos.CompactionDescriptor getCompaction(Cell kv) throws IOException
kv
- the key valueIOException
public static WALEdit createBulkLoadEvent(HRegionInfo hri, WALProtos.BulkLoadDescriptor bulkLoadDescriptor)
hri
- The HRegionInfo for the region in which we are bulk loadingbulkLoadDescriptor
- The descriptor for the Bulk Loaderpublic static WALProtos.BulkLoadDescriptor getBulkLoadDescriptor(Cell cell) throws IOException
cell
- the key valueIOException
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.