public final class DeleteRequest extends HBaseRpc implements HBaseRpc.HasTable, HBaseRpc.HasKey, HBaseRpc.HasFamily, HBaseRpc.HasQualifiers
byte
arrays in argumentbyte[]
in argument will copy it.
For more info, please refer to the documentation of HBaseRpc
.
String
s in argumenttimestamp
s in argumentDeleteRequest
that is created with a specific timestamp in argument will only delete
values in HBase that were previously stored with a timestamp less than
or equal to that of the DeleteRequest
unless
setDeleteAtTimestampOnly(boolean)
is also called, in which case only the
value at the specified timestamp is deleted.HBaseRpc.HasFamily, HBaseRpc.HasKey, HBaseRpc.HasQualifier, HBaseRpc.HasQualifiers, HBaseRpc.HasTable, HBaseRpc.HasTimestamp, HBaseRpc.HasValue, HBaseRpc.HasValues
Modifier and Type | Field and Description |
---|---|
static byte[] |
MUTATE
RPC method name to use with HBase 0.95+.
|
Constructor and Description |
---|
DeleteRequest(byte[] table,
byte[] key)
Constructor to delete an entire row.
|
DeleteRequest(byte[] table,
byte[] key,
byte[] family)
Constructor to delete a specific family.
|
DeleteRequest(byte[] table,
byte[] key,
byte[] family,
byte[] qualifier)
Constructor to delete a specific cell.
|
DeleteRequest(byte[] table,
byte[] key,
byte[] family,
byte[][] qualifiers)
Constructor to delete a specific number of cells in a row.
|
DeleteRequest(byte[] table,
byte[] key,
byte[] family,
byte[][] qualifiers,
long timestamp)
Constructor to delete a specific number of cells in a row.
|
DeleteRequest(byte[] table,
byte[] key,
byte[] family,
byte[][] qualifiers,
long timestamp,
RowLock lock)
Constructor to delete a specific number of cells in a row with a row lock.
|
DeleteRequest(byte[] table,
byte[] key,
byte[] family,
byte[][] qualifiers,
RowLock lock)
Constructor to delete a specific number of cells in a row.
|
DeleteRequest(byte[] table,
byte[] key,
byte[] family,
byte[] qualifier,
long timestamp)
Constructor to delete a specific cell before a specific timestamp.
|
DeleteRequest(byte[] table,
byte[] key,
byte[] family,
byte[] qualifier,
long timestamp,
RowLock lock)
Constructor to delete a specific cell with an explicit row lock.
|
DeleteRequest(byte[] table,
byte[] key,
byte[] family,
byte[] qualifier,
RowLock lock)
Constructor to delete a specific cell with an explicit row lock.
|
DeleteRequest(byte[] table,
byte[] key,
byte[] family,
long timestamp)
Constructor to delete a specific family before a specific timestamp.
|
DeleteRequest(byte[] table,
byte[] key,
long timestamp)
Constructor to delete an entire row before a specific timestamp.
|
DeleteRequest(byte[] table,
KeyValue kv)
Constructor to delete a specific cell.
|
DeleteRequest(byte[] table,
KeyValue kv,
RowLock lock)
Constructor to delete a specific cell with an explicit row lock.
|
DeleteRequest(String table,
String key)
Constructor to delete an entire row.
|
DeleteRequest(String table,
String key,
String family)
Constructor to delete a specific family.
|
DeleteRequest(String table,
String key,
String family,
String qualifier)
Constructor to delete a specific cell.
|
DeleteRequest(String table,
String key,
String family,
String qualifier,
RowLock lock)
Constructor to delete a specific cell with an explicit row lock.
|
Modifier and Type | Method and Description |
---|---|
boolean |
deleteAtTimestampOnly()
Returns whether to only delete the cell value at the timestamp.
|
byte[] |
family()
Returns the family this RPC is for.
|
byte[] |
key()
Returns the row key this RPC is for.
|
byte[][] |
qualifiers()
Returns the column qualifiers this RPC is for.
|
void |
setBufferable(boolean bufferable)
Sets whether or not this RPC is can be buffered on the client side.
|
void |
setDeleteAtTimestampOnly(boolean at_timestamp_only)
Deletes only the cell value with the timestamp specified in the
constructor.
|
void |
setDurable(boolean durable)
Changes the durability setting of this edit.
|
byte[] |
table()
Returns the name of the table this RPC is for.
|
long |
timestamp()
Returns the strictly positive timestamp contained in this RPC.
|
String |
toString() |
failfast, setFailfast
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
family
public DeleteRequest(byte[] table, byte[] key)
table
- The table to edit.key
- The key of the row to edit in that table.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, long timestamp)
table
- The table to edit.key
- The key of the row to edit in that table.timestamp
- The timestamp to set on this edit.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, byte[] family)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, byte[] family, long timestamp)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.timestamp
- The timestamp to set on this edit.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, byte[] family, byte[] qualifier)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.qualifier
- The column qualifier to delete in that family.
Can be null
since version 1.1.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, byte[] family, byte[] qualifier, long timestamp)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.qualifier
- The column qualifier to delete in that family.
Can be null
, to delete the whole family.timestamp
- The timestamp to set on this edit.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, byte[] family, byte[][] qualifiers)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.qualifiers
- The column qualifiers to delete in that family.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, byte[] family, byte[][] qualifiers, long timestamp)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.qualifiers
- The column qualifiers to delete in that family.timestamp
- The timestamp to set on this edit.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, byte[] family, byte[] qualifier, RowLock lock)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.qualifier
- The column qualifier to delete in that family.lock
- An explicit row lock to use with this request.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, byte[] family, byte[] qualifier, long timestamp, RowLock lock)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.qualifier
- The column qualifier to delete in that family.timestamp
- The timestamp to set on this edit.lock
- An explicit row lock to use with this request.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, byte[] family, byte[][] qualifiers, RowLock lock)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.qualifiers
- The column qualifiers to delete in that family.
Can be null
.lock
- An explicit row lock to use with this request.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, byte[] key, byte[] family, byte[][] qualifiers, long timestamp, RowLock lock)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.qualifiers
- The column qualifiers to delete in that family.
Can be null
.timestamp
- The timestamp to set on this edit.lock
- An explicit row lock to use with this request.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(String table, String key)
table
- The table to edit.key
- The key of the row to edit in that table.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(String table, String key, String family)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(String table, String key, String family, String qualifier)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.qualifier
- The column qualifier to delete in that family.
Can be null
since version 1.1.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(String table, String key, String family, String qualifier, RowLock lock)
table
- The table to edit.key
- The key of the row to edit in that table.family
- The column family to edit in that table.qualifier
- The column qualifier to delete in that family.
Can be null
since version 1.1.lock
- An explicit row lock to use with this request.IllegalArgumentException
- if any argument is malformed.public DeleteRequest(byte[] table, KeyValue kv)
public void setDeleteAtTimestampOnly(boolean at_timestamp_only)
Only applicable when qualifier(s) is also specified.
public boolean deleteAtTimestampOnly()
public byte[] table()
HBaseRpc.HasTable
DO NOT MODIFY THE CONTENTS OF THE ARRAY RETURNED.
table
in interface HBaseRpc.HasTable
public byte[] key()
HBaseRpc.HasKey
DO NOT MODIFY THE CONTENTS OF THE ARRAY RETURNED.
key
in interface HBaseRpc.HasKey
public byte[][] qualifiers()
HBaseRpc.HasQualifiers
DO NOT MODIFY THE CONTENTS OF THE ARRAY RETURNED.
qualifiers
in interface HBaseRpc.HasQualifiers
public final void setBufferable(boolean bufferable)
true
.
Setting this to false
bypasses the client-side buffering, which
is used to send RPCs in batches for greater throughput, and causes this
RPC to be sent directly to the server.
bufferable
- Whether or not this RPC can be buffered (i.e. delayed)
before being sent out to HBase.HBaseClient.setFlushInterval(short)
public final void setDurable(boolean durable)
true
.
Make sure you've read and understood the
data durability section before
setting this to false
.durable
- Whether or not this edit should be stored with data
durability guarantee.public final byte[] family()
HBaseRpc.HasFamily
DO NOT MODIFY THE CONTENTS OF THE ARRAY RETURNED.
family
in interface HBaseRpc.HasFamily
public final long timestamp()
HBaseRpc.HasTimestamp
timestamp
in interface HBaseRpc.HasTimestamp