|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.BatchOperation
public class BatchOperation
Batch update operation. If value is null, its a DELETE operation. If its non-null, its a PUT. This object is purposely bare-bones because many instances are created during bulk uploads. We have one class for DELETEs and PUTs rather than a class per type because it makes the serialization easier.
BatchUpdate
Constructor Summary | |
---|---|
BatchOperation()
Default constructor used by Writable |
|
BatchOperation(Text column)
Creates a DELETE batch operation. |
|
BatchOperation(Text column,
byte[] value)
Create a batch operation. |
Method Summary | |
---|---|
Text |
getColumn()
|
byte[] |
getValue()
|
boolean |
isPut()
|
void |
readFields(DataInput in)
Deserialize the fields of this object from in . |
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, toString, wait, wait, wait |
Constructor Detail |
---|
public BatchOperation()
public BatchOperation(Text column)
column
- column namepublic BatchOperation(Text column, byte[] value)
column
- column namevalue
- column value. If non-null, this is a PUT operation.Method Detail |
---|
public Text getColumn()
public byte[] getValue()
public boolean isPut()
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.
IOException
public void write(DataOutput out) throws IOException
Writable
out
.
write
in interface Writable
out
- DataOuput
to serialize this object into.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |