org.apache.hadoop.hbase.io
Class BatchOperation

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

public class BatchOperation
extends Object
implements Writable

batch update operation


Field Summary
static int DELETE_OP
          delete operation
static int PUT_OP
          put operation
 
Constructor Summary
BatchOperation()
          default constructor used by Writable
BatchOperation(Text column)
          Creates a delete operation
BatchOperation(Text column, byte[] value)
          Creates a put operation
 
Method Summary
 Text getColumn()
           
 int getOp()
           
 byte[] getValue()
           
 void readFields(DataInput in)
          Reads the fields of this object from in.
 void write(DataOutput out)
          Writes the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUT_OP

public static final int PUT_OP
put operation

See Also:
Constant Field Values

DELETE_OP

public static final int DELETE_OP
delete operation

See Also:
Constant Field Values
Constructor Detail

BatchOperation

public BatchOperation()
default constructor used by Writable


BatchOperation

public BatchOperation(Text column,
                      byte[] value)
Creates a put operation

Parameters:
column - column name
value - column value

BatchOperation

public BatchOperation(Text column)
Creates a delete operation

Parameters:
column - name of column to delete
Method Detail

getColumn

public Text getColumn()
Returns:
the column

getOp

public int getOp()
Returns:
the operation

getValue

public byte[] getValue()
Returns:
the value

readFields

public void readFields(DataInput in)
                throws IOException
Reads 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
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Writes the fields of this object to out.

Specified by:
write in interface Writable
Throws:
IOException


Copyright © 2006 The Apache Software Foundation