org.apache.hadoop.hbase.regionserver
Class HLogEdit

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.HLogEdit
All Implemented Interfaces:
HConstants, org.apache.hadoop.io.Writable

public class HLogEdit
extends Object
implements org.apache.hadoop.io.Writable, HConstants

A log value. These aren't sortable; you need to sort by the matching HLogKey. The table and row are already identified in HLogKey. This just indicates the column and value.


Field Summary
static ImmutableBytesWritable completeCacheFlush
          Value written to HLog on a complete cache flush
static ImmutableBytesWritable deleteBytes
          Value stored for a deleted item
 
Fields inherited from interface org.apache.hadoop.hbase.HConstants
ALL_META_COLUMNS, ALL_VERSIONS, COL_REGIONINFO, COL_REGIONINFO_ARRAY, COL_SERVER, COL_SPLITA, COL_SPLITB, COL_STARTCODE, COLUMN_FAMILY, COLUMN_FAMILY_ARRAY, COLUMN_FAMILY_HISTORIAN, COLUMN_FAMILY_HISTORIAN_STR, COLUMN_FAMILY_STR, DEFAULT_CLIENT_RETRIES, DEFAULT_HOST, DEFAULT_MASTER_ADDRESS, DEFAULT_MASTER_INFOPORT, DEFAULT_MASTER_PORT, DEFAULT_MAX_FILE_SIZE, DEFAULT_REGION_SERVER_CLASS, DEFAULT_REGIONSERVER_ADDRESS, DEFAULT_REGIONSERVER_INFOPORT, DEFAULT_SIZE_RESERVATION_BLOCK, EMPTY_BYTE_ARRAY, EMPTY_END_ROW, EMPTY_START_ROW, FILE_SYSTEM_VERSION, FOREVER, HBASE_CLIENT_RETRIES_NUMBER_KEY, HBASE_DIR, HREGION_LOGDIR_NAME, HREGION_OLDLOGFILE_NAME, IN_MEMORY, LAST_ROW, LATEST_TIMESTAMP, MASTER_ADDRESS, META_TABLE_NAME, NAME, NINES, REGION_SERVER_CLASS, REGION_SERVER_IMPL, REGIONSERVER_ADDRESS, RETRY_BACKOFF, ROOT_TABLE_NAME, THREAD_WAKE_FREQUENCY, UTF8_ENCODING, VERSION_FILE_NAME, VERSIONS, ZERO_L, ZEROES
 
Constructor Summary
HLogEdit()
          Default constructor used by Writable
HLogEdit(byte[] c, byte[] bval, long timestamp)
          Construct a fully initialized HLogEdit
 
Method Summary
 byte[] getColumn()
           
 long getTimestamp()
           
 byte[] getVal()
           
static boolean isDeleted(byte[] value)
           
 void readFields(DataInput in)
          
 String toString()
           
 void write(DataOutput out)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

deleteBytes

public static ImmutableBytesWritable deleteBytes
Value stored for a deleted item


completeCacheFlush

public static ImmutableBytesWritable completeCacheFlush
Value written to HLog on a complete cache flush

Constructor Detail

HLogEdit

public HLogEdit()
Default constructor used by Writable


HLogEdit

public HLogEdit(byte[] c,
                byte[] bval,
                long timestamp)
Construct a fully initialized HLogEdit

Parameters:
c - column name
bval - value
timestamp - timestamp for modification
Method Detail

isDeleted

public static boolean isDeleted(byte[] value)
Parameters:
value -
Returns:
True if an entry and its content is deleteBytes.

getColumn

public byte[] getColumn()
Returns:
the column

getVal

public byte[] getVal()
Returns:
the value

getTimestamp

public long getTimestamp()
Returns:
the timestamp

toString

public String toString()
Overrides:
toString in class Object
Returns:
First column name, timestamp, and first 128 bytes of the value bytes as a String.

write

public void write(DataOutput out)
           throws IOException

Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException

Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2008 The Apache Software Foundation