org.apache.hadoop.hbase
Class HLogEdit

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

public class HLogEdit
extends Object
implements Writable

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.


Constructor Summary
HLogEdit()
          Default constructor used by Writable
HLogEdit(Text column, byte[] bval, long timestamp)
          Construct a fully initialized HLogEdit
 
Method Summary
 Text getColumn()
           
 long getTimestamp()
           
 byte[] getVal()
           
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 String toString()
           
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HLogEdit

public HLogEdit()
Default constructor used by Writable


HLogEdit

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

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

getColumn

public Text 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
Serialize the fields of this object to out.

Specified by:
write in interface Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Deserialize the fields of this object from in.

For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
IOException


Copyright © 2006 The Apache Software Foundation