|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.client.Delete
public class Delete
Used to perform Delete operations on a single row.
To delete an entire row, instantiate a Delete object with the row to delete. To further define the scope of what to delete, perform additional methods as outlined below.
To delete specific families, execute deleteFamily
for each family to delete.
To delete multiple versions of specific columns, execute
deleteColumns
for each column to delete.
To delete specific versions of specific columns, execute
deleteColumn
for each column version to delete.
Specifying timestamps calling constructor, deleteFamily, and deleteColumns will delete all versions with a timestamp less than or equal to that specified. Specifying a timestamp to deleteColumn will delete versions only with a timestamp equal to that specified.
The timestamp passed to the constructor is only used ONLY for delete of rows. For anything less -- a deleteColumn, deleteColumns or deleteFamily -- then you need to use the method overrides that take a timestamp. The constructor timestamp is not referenced.
Constructor Summary | |
---|---|
Delete()
Constructor for Writable. |
|
Delete(byte[] row)
Create a Delete operation for the specified row. |
|
Delete(byte[] row,
long timestamp,
RowLock rowLock)
Create a Delete operation for the specified row and timestamp, using an optional row lock. |
|
Delete(Delete d)
|
Method Summary | |
---|---|
Delete |
deleteColumn(byte[] column)
Delete the latest version of the specified column, given in family:qualifier notation. |
Delete |
deleteColumn(byte[] family,
byte[] qualifier)
Delete the latest version of the specified column. |
Delete |
deleteColumn(byte[] family,
byte[] qualifier,
long timestamp)
Delete the specified version of the specified column. |
void |
deleteColumns(byte[] column)
|
Delete |
deleteColumns(byte[] family,
byte[] qualifier)
Delete all versions of the specified column. |
Delete |
deleteColumns(byte[] family,
byte[] qualifier,
long timestamp)
Delete all versions of the specified column with a timestamp less than or equal to the specified timestamp. |
Delete |
deleteColumns(byte[] column,
long timestamp)
Delete all versions of the specified column, given in family:qualifier notation, and with a timestamp less than
or equal to the specified timestamp. |
Delete |
deleteFamily(byte[] family)
Delete all versions of all columns of the specified family. |
Delete |
deleteFamily(byte[] family,
long timestamp)
Delete all columns of the specified family with a timestamp less than or equal to the specified timestamp. |
Map<byte[],List<KeyValue>> |
getFamilyMap()
Method for retrieving the delete's familyMap |
long |
getLockId()
Method for retrieving the delete's lock ID. |
byte[] |
getRow()
Method for retrieving the delete's row |
RowLock |
getRowLock()
Method for retrieving the delete's RowLock |
long |
getTimeStamp()
Method for retrieving the delete's timestamp |
boolean |
isEmpty()
Method to check if the familyMap is empty |
void |
readFields(DataInput in)
|
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 Delete()
public Delete(byte[] row)
If no further operations are done, this will delete everything associated with the specified row (all versions of all columns in all families).
row
- row keypublic Delete(byte[] row, long timestamp, RowLock rowLock)
If no further operations are done, this will delete all columns in all families of the specified row with a timestamp less than or equal to the specified timestamp.
This timestamp is ONLY used for a delete row operation. If specifying families or columns, you must specify each timestamp individually.
row
- row keytimestamp
- maximum version timestamp (only for delete row)rowLock
- previously acquired row lock, or nullpublic Delete(Delete d)
d
- Delete to clone.Method Detail |
---|
public boolean isEmpty()
public Delete deleteFamily(byte[] family)
Overrides previous calls to deleteColumn and deleteColumns for the specified family.
family
- family namepublic Delete deleteFamily(byte[] family, long timestamp)
Overrides previous calls to deleteColumn and deleteColumns for the specified family.
family
- family nametimestamp
- maximum version timestamppublic Delete deleteColumns(byte[] family, byte[] qualifier)
family
- family namequalifier
- column qualifierpublic Delete deleteColumns(byte[] family, byte[] qualifier, long timestamp)
family
- family namequalifier
- column qualifiertimestamp
- maximum version timestamppublic Delete deleteColumns(byte[] column, long timestamp)
family:qualifier
notation, and with a timestamp less than
or equal to the specified timestamp.
column
- colon-delimited family and qualifiertimestamp
- maximum version timestamppublic Delete deleteColumn(byte[] family, byte[] qualifier)
family
- family namequalifier
- column qualifierpublic Delete deleteColumn(byte[] family, byte[] qualifier, long timestamp)
family
- family namequalifier
- column qualifiertimestamp
- version timestamppublic void deleteColumns(byte[] column)
public Delete deleteColumn(byte[] column)
family:qualifier
notation.
column
- colon-delimited family and qualifierpublic Map<byte[],List<KeyValue>> getFamilyMap()
public byte[] getRow()
public RowLock getRowLock()
public long getLockId()
public long getTimeStamp()
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 |