@InterfaceAudience.Private public class WALEdit extends Object implements org.apache.hadoop.io.Writable, HeapSize
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOG |
static byte[] |
METAFAMILY |
| Modifier and Type | Method and Description |
|---|---|
WALEdit |
add(Cell cell)
Adds a Cell to this edit
|
WALEdit |
add(KeyValue kv)
Deprecated.
Use
add(Cell) instead |
static WALEdit |
createCompaction(HRegionInfo hri,
WALProtos.CompactionDescriptor c)
Create a compacion WALEdit
|
NavigableMap<byte[],Integer> |
getAndRemoveScopes() |
ArrayList<Cell> |
getCells() |
static WALProtos.CompactionDescriptor |
getCompaction(Cell kv)
Deserialized and returns a CompactionDescriptor is the KeyValue contains one.
|
ArrayList<KeyValue> |
getKeyValues()
Deprecated.
Use
getCells() instead |
long |
heapSize() |
boolean |
isEmpty() |
static boolean |
isMetaEditFamily(byte[] f) |
boolean |
isReplay() |
void |
readFields(DataInput in) |
int |
readFromCells(Codec.Decoder cellDecoder,
int expectedCount)
Reads WALEdit from cells.
|
void |
setCompressionContext(org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext) |
int |
size() |
String |
toString() |
void |
write(DataOutput out) |
public static final org.apache.commons.logging.Log LOG
public static final byte[] METAFAMILY
public static boolean isMetaEditFamily(byte[] f)
f - f is METAFAMILYpublic boolean isReplay()
public void setCompressionContext(org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext)
@Deprecated public WALEdit add(KeyValue kv)
add(Cell) insteadkv - public WALEdit add(Cell cell)
cell - public boolean isEmpty()
public int size()
@Deprecated public ArrayList<KeyValue> getKeyValues()
getCells() insteadpublic NavigableMap<byte[],Integer> getAndRemoveScopes()
public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic int readFromCells(Codec.Decoder cellDecoder, int expectedCount) throws IOException
cellDecoder - Cell decoder.expectedCount - Expected cell count.IOExceptionpublic long heapSize()
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 valueIOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.