|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.BatchUpdate
public class BatchUpdate
A Writable object that contains a series of BatchOperations There is one BatchUpdate object per server, so a series of batch operations can result in multiple BatchUpdate objects if the batch contains rows that are served by multiple region servers.
Constructor Summary | |
---|---|
BatchUpdate()
Default constructor used serializing. |
|
BatchUpdate(byte[] row)
Initialize a BatchUpdate operation on a row. |
|
BatchUpdate(byte[] row,
long timestamp)
Initialize a BatchUpdate operation on a row with a specific timestamp. |
|
BatchUpdate(String row)
Initialize a BatchUpdate operation on a row. |
|
BatchUpdate(String row,
long timestamp)
Initialize a BatchUpdate operation on a row with a specific timestamp. |
Method Summary | |
---|---|
void |
delete(byte[] column)
Delete the value for a column Deletes the cell whose row/column/commit-timestamp match those of the delete. |
void |
delete(String column)
Delete the value for a column Deletes the cell whose row/column/commit-timestamp match those of the delete. |
byte[] |
get(byte[] column)
Get the current value of the specified column |
byte[] |
get(String column)
Get the current value of the specified column |
byte[][] |
getColumns()
Get the current columns |
byte[] |
getRow()
|
long |
getTimestamp()
|
boolean |
hasColumn(byte[] column)
Check if the specified column is currently assigned a value |
boolean |
hasColumn(String column)
Check if the specified column is currently assigned a value |
Iterator<BatchOperation> |
iterator()
|
void |
put(byte[] column,
byte[] val)
Change a value for the specified column |
void |
put(String column,
byte[] val)
Change a value for the specified column |
void |
readFields(DataInput in)
|
void |
setTimestamp(long timestamp)
Set this BatchUpdate's timestamp. |
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BatchUpdate()
public BatchUpdate(String row)
row
- public BatchUpdate(byte[] row)
row
- public BatchUpdate(String row, long timestamp)
row
- timestamp
- public BatchUpdate(byte[] row, long timestamp)
row
- timestamp
- Method Detail |
---|
public byte[] getRow()
public long getTimestamp()
public void setTimestamp(long timestamp)
timestamp
- public byte[] get(String column)
column
- column name
public byte[] get(byte[] column)
column
- column name
public byte[][] getColumns()
public boolean hasColumn(String column)
column
- column to check for
public boolean hasColumn(byte[] column)
column
- column to check for
public void put(String column, byte[] val)
column
- column whose value is being setval
- new value for column. Cannot be null (can be empty).public void put(byte[] column, byte[] val)
column
- column whose value is being setval
- new value for column. Cannot be null (can be empty).public void delete(String column)
column
- name of column whose value is to be deletedpublic void delete(byte[] column)
column
- name of column whose value is to be deletedpublic Iterator<BatchOperation> iterator()
iterator
in interface Iterable<BatchOperation>
public String toString()
toString
in class Object
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |