|
||||||||||
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.
Field Summary | |
---|---|
static int |
ESTIMATED_HEAP_TAX
Estimated 'shallow size' of this object not counting payload. |
Constructor Summary | |
---|---|
BatchUpdate()
Default constructor used serializing. |
|
BatchUpdate(BatchUpdate buToCopy)
Recopy constructor |
|
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 | |
---|---|
int |
compareTo(BatchUpdate o)
|
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 |
getRowLock()
Get the row lock associated with this update |
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 |
long |
heapSize()
|
Iterator<BatchOperation> |
iterator()
|
static void |
main(String[] args)
Code to test sizes of BatchUpdate arrays. |
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 |
setRowLock(long rowLock)
Set the lock to be used for this update |
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 |
Field Detail |
---|
public static final int ESTIMATED_HEAP_TAX
Constructor Detail |
---|
public BatchUpdate()
public BatchUpdate(String row)
row
- public BatchUpdate(byte[] row)
row
- public BatchUpdate(String row, long timestamp)
row
- timestamp
- public BatchUpdate(BatchUpdate buToCopy)
buToCopy
- BatchUpdate to copypublic BatchUpdate(byte[] row, long timestamp)
row
- timestamp
- Method Detail |
---|
public long getRowLock()
public void setRowLock(long rowLock)
rowLock
- the row lockpublic 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
public int compareTo(BatchUpdate o)
compareTo
in interface Comparable<BatchUpdate>
public long heapSize()
heapSize
in interface HeapSize
public static void main(String[] args) throws InterruptedException
args
-
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |