public final class AnyDelete extends Object
Delete
in HBase to reduce the manual conversion between bytes and String/Object.Delete
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.hbase.client.OperationWithAttributes |
ap
The ap.
|
protected org.apache.hadoop.hbase.client.Mutation |
mutation
The mutation.
|
protected org.apache.hadoop.hbase.client.Operation |
op
The op.
|
Constructor and Description |
---|
AnyDelete(org.apache.hadoop.hbase.client.Delete deleteToCopy)
Instantiates a new any delete.
|
AnyDelete(Object rowKey)
Instantiates a new any delete.
|
AnyDelete(Object rowKey,
int rowOffset,
int rowLength)
Instantiates a new any delete.
|
AnyDelete(Object rowKey,
int rowOffset,
int rowLength,
long timestamp)
Instantiates a new any delete.
|
AnyDelete(Object rowKey,
long timestamp)
Instantiates a new any delete.
|
AnyDelete(Object row,
long timestamp,
NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> familyMap)
Instantiates a new any delete.
|
Modifier and Type | Method and Description |
---|---|
AnyDelete |
add(org.apache.hadoop.hbase.Cell kv)
Adds the.
|
AnyDelete |
addColumn(byte[] family,
byte[] qualifier)
Delete the latest version of the specified column.
|
AnyDelete |
addColumn(byte[] family,
byte[] qualifier,
long timestamp)
Delete the specified version of the specified column.
|
AnyDelete |
addColumn(String family,
String qualifier)
Delete the latest version of the specified column.
|
AnyDelete |
addColumn(String family,
String qualifier,
long timestamp)
Delete the specified version of the specified column.
|
AnyDelete |
addColumns(byte[] family,
byte[] qualifier)
Delete all versions of the specified column.
|
AnyDelete |
addColumns(byte[] family,
byte[] qualifier,
long timestamp)
Delete all versions of the specified column with a timestamp less than or equal to the specified timestamp.
|
AnyDelete |
addColumns(String family,
String qualifier)
Delete all versions of the specified column.
|
AnyDelete |
addColumns(String family,
String qualifier,
long timestamp)
Delete all versions of the specified column with a timestamp less than or equal to the specified timestamp.
|
AnyDelete |
addDeleteMarker(org.apache.hadoop.hbase.Cell kv)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
add(Cell)
instead |
AnyDelete |
addFamily(byte[] family)
Delete all versions of all columns of the specified family.
|
AnyDelete |
addFamily(byte[] family,
long timestamp)
Delete all columns of the specified family with a timestamp less than
or equal to the specified timestamp.
|
AnyDelete |
addFamily(String family)
Delete all versions of all columns of the specified family.
|
AnyDelete |
addFamily(String family,
long timestamp)
Delete all columns of the specified family with a timestamp less than
or equal to the specified timestamp.
|
AnyDelete |
addFamilyVersion(byte[] family,
long timestamp)
Delete all columns of the specified family with a timestamp equal to the specified timestamp.
|
AnyDelete |
addFamilyVersion(String family,
long timestamp)
Delete all columns of the specified family with a timestamp equal to the specified timestamp.
|
org.apache.hadoop.hbase.CellScanner |
cellScanner()
Cell scanner.
|
int |
compareTo(org.apache.hadoop.hbase.client.Row d)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
Row.COMPARATOR instead |
boolean |
equals(Object obj)
Equals.
|
List<org.apache.hadoop.hbase.Cell> |
get(byte[] family,
byte[] qualifier)
Returns a list of all KeyValue objects with matching column family and qualifier.
|
List<org.apache.hadoop.hbase.Cell> |
get(String family,
String qualifier)
Returns a list of all KeyValue objects with matching column family and qualifier.
|
byte[] |
getACL()
Gets the acl.
|
byte[] |
getAttribute(String name)
Gets the attribute.
|
Map<String,byte[]> |
getAttributesMap()
Gets the attributes map.
|
org.apache.hadoop.hbase.security.visibility.CellVisibility |
getCellVisibility()
Gets the cell visibility.
|
List<UUID> |
getClusterIds()
Gets the cluster ids.
|
org.apache.hadoop.hbase.client.Durability |
getDurability()
Get the current durability.
|
NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> |
getFamilyCellMap()
Method for retrieving the put's familyMap.
|
Map<String,Object> |
getFingerprint()
Compile the column family (i.e.
|
String |
getId()
This method allows you to retrieve the identifier for the operation if one
was set.
|
int |
getPriority()
Gets the priority.
|
byte[] |
getRow()
Method for retrieving the delete's row.
|
long |
getTimestamp()
Method for retrieving the timestamp.
|
long |
getTimeStamp()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
getTimestamp() instead |
long |
getTTL()
Return the TTL requested for the result of the mutation, in milliseconds.
|
boolean |
has(byte[] family,
byte[] qualifier)
A convenience method to determine if this object's familyMap contains
a value assigned to the given family & qualifier.
|
boolean |
has(byte[] family,
byte[] qualifier,
byte[] value)
A convenience method to determine if this object's familyMap contains
a value assigned to the given family, qualifier and timestamp.
|
boolean |
has(byte[] family,
byte[] qualifier,
long ts)
A convenience method to determine if this object's familyMap contains
a value assigned to the given family, qualifier and timestamp.
|
boolean |
has(byte[] family,
byte[] qualifier,
long ts,
byte[] value)
A convenience method to determine if this object's familyMap contains
the given value assigned to the given family, qualifier and timestamp.
|
boolean |
has(String family,
String qualifier)
A convenience method to determine if this object's familyMap contains
a value assigned to the given family & qualifier.
|
boolean |
has(String family,
String qualifier,
long ts)
A convenience method to determine if this object's familyMap contains
a value assigned to the given family, qualifier and timestamp.
|
boolean |
has(String family,
String qualifier,
long ts,
Object value)
A convenience method to determine if this object's familyMap contains
the given value assigned to the given family, qualifier and timestamp.
|
boolean |
has(String family,
String qualifier,
Object value)
A convenience method to determine if this object's familyMap contains
a value assigned to the given family, qualifier and timestamp.
|
int |
hashCode()
Hash code.
|
long |
heapSize()
Heap size.
|
boolean |
isEmpty()
Method to check if the familyMap is empty.
|
int |
numFamilies()
Num families.
|
static AnyDelete |
of(org.apache.hadoop.hbase.client.Delete deleteToCopy)
Of.
|
static AnyDelete |
of(Object rowKey)
Of.
|
static AnyDelete |
of(Object rowKey,
int rowOffset,
int rowLength)
Of.
|
static AnyDelete |
of(Object rowKey,
int rowOffset,
int rowLength,
long timestamp)
Of.
|
static AnyDelete |
of(Object rowKey,
long timestamp)
Of.
|
static AnyDelete |
of(Object row,
long timestamp,
NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> familyMap)
Of.
|
MP |
setACL(Map<String,org.apache.hadoop.hbase.security.access.Permission> perms)
Sets the ACL.
|
MP |
setACL(String user,
org.apache.hadoop.hbase.security.access.Permission perms)
Sets the ACL.
|
AP |
setAttribute(String name,
Object value)
Sets the attribute.
|
MP |
setCellVisibility(org.apache.hadoop.hbase.security.visibility.CellVisibility expression)
Sets the visibility expression associated with cells in this Mutation.
|
MP |
setClusterIds(List<UUID> clusterIds)
Marks that the clusters with the given clusterIds have consumed the mutation.
|
MP |
setDurability(org.apache.hadoop.hbase.client.Durability d)
Set the durability for this mutation.
|
MP |
setFamilyCellMap(NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> map)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
Mutation.Mutation(byte[], long, NavigableMap) instead |
AP |
setId(String id)
This method allows you to set an identifier on an operation.
|
AP |
setPriority(int priority)
Sets the priority.
|
MP |
setTimestamp(long timestamp)
Set the timestamp of the delete.
|
MP |
setTTL(long ttl)
Set the TTL desired for the result of the mutation, in milliseconds.
|
int |
size()
Number of KeyValues carried by this Mutation.
|
String |
toJSON()
To JSON.
|
String |
toJSON(int maxCols)
To JSON.
|
Map<String,Object> |
toMap()
To map.
|
Map<String,Object> |
toMap(int maxCols)
To map.
|
String |
toString()
To string.
|
String |
toString(int maxCols)
To string.
|
org.apache.hadoop.hbase.client.Delete |
val()
Val.
|
protected final org.apache.hadoop.hbase.client.Mutation mutation
protected final org.apache.hadoop.hbase.client.OperationWithAttributes ap
protected final org.apache.hadoop.hbase.client.Operation op
public AnyDelete(Object rowKey)
rowKey
- the row keypublic AnyDelete(Object rowKey, long timestamp)
rowKey
- the row keytimestamp
- the timestamppublic AnyDelete(Object rowKey, int rowOffset, int rowLength)
rowKey
- the row keyrowOffset
- the row offsetrowLength
- the row lengthpublic AnyDelete(Object rowKey, int rowOffset, int rowLength, long timestamp)
rowKey
- the row keyrowOffset
- the row offsetrowLength
- the row lengthtimestamp
- the timestamppublic AnyDelete(Object row, long timestamp, NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> familyMap)
row
- the rowtimestamp
- the timestampfamilyMap
- the family mappublic AnyDelete(org.apache.hadoop.hbase.client.Delete deleteToCopy)
deleteToCopy
- delete to copypublic static AnyDelete of(Object rowKey)
rowKey
- the row keypublic static AnyDelete of(Object rowKey, long timestamp)
rowKey
- the row keytimestamp
- the timestamppublic static AnyDelete of(Object rowKey, int rowOffset, int rowLength)
rowKey
- the row keyrowOffset
- the row offsetrowLength
- the row lengthpublic static AnyDelete of(Object rowKey, int rowOffset, int rowLength, long timestamp)
rowKey
- the row keyrowOffset
- the row offsetrowLength
- the row lengthtimestamp
- the timestamppublic static AnyDelete of(Object row, long timestamp, NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> familyMap)
row
- the rowtimestamp
- the timestampfamilyMap
- the family mappublic static AnyDelete of(org.apache.hadoop.hbase.client.Delete deleteToCopy)
deleteToCopy
- the delete to copypublic org.apache.hadoop.hbase.client.Delete val()
@Deprecated public AnyDelete addDeleteMarker(org.apache.hadoop.hbase.Cell kv) throws IOException
add(Cell)
insteadkv
- An existing KeyValue of type "delete".IOException
- Signals that an I/O exception has occurred.public AnyDelete add(org.apache.hadoop.hbase.Cell kv) throws IOException
kv
- the kvIOException
- Signals that an I/O exception has occurred.public AnyDelete addFamily(String family)
Overrides previous calls to deleteColumn and deleteColumns for the specified family.
family
- the familypublic AnyDelete addFamily(String family, long timestamp)
Overrides previous calls to deleteColumn and deleteColumns for the specified family.
family
- the familytimestamp
- the timestamppublic AnyDelete addFamily(byte[] family)
Overrides previous calls to deleteColumn and deleteColumns for the specified family.
family
- the familypublic AnyDelete addFamily(byte[] family, long timestamp)
Overrides previous calls to deleteColumn and deleteColumns for the specified family.
family
- the familytimestamp
- the timestamppublic AnyDelete addFamilyVersion(String family, long timestamp)
family
- the familytimestamp
- the timestamppublic AnyDelete addFamilyVersion(byte[] family, long timestamp)
family
- the familytimestamp
- the timestamppublic AnyDelete addColumn(String family, String qualifier)
family
- the familyqualifier
- the qualifierpublic AnyDelete addColumn(String family, String qualifier, long timestamp)
family
- the familyqualifier
- the qualifiertimestamp
- the timestamppublic AnyDelete addColumn(byte[] family, byte[] qualifier)
family
- the familyqualifier
- the qualifierpublic AnyDelete addColumn(byte[] family, byte[] qualifier, long timestamp)
family
- the familyqualifier
- the qualifiertimestamp
- the timestamppublic AnyDelete addColumns(String family, String qualifier)
family
- the familyqualifier
- the qualifierpublic AnyDelete addColumns(String family, String qualifier, long timestamp)
family
- the familyqualifier
- the qualifiertimestamp
- the timestamppublic AnyDelete addColumns(byte[] family, byte[] qualifier)
family
- the familyqualifier
- the qualifierpublic AnyDelete addColumns(byte[] family, byte[] qualifier, long timestamp)
family
- the familyqualifier
- the qualifiertimestamp
- the timestamppublic boolean equals(Object obj)
public String toString()
public org.apache.hadoop.hbase.CellScanner cellScanner()
public Map<String,Object> getFingerprint()
public org.apache.hadoop.hbase.client.Durability getDurability()
public MP setDurability(org.apache.hadoop.hbase.client.Durability d)
d
- the dpublic NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> getFamilyCellMap()
@Deprecated public MP setFamilyCellMap(NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> map)
Mutation.Mutation(byte[], long, NavigableMap)
insteadmap
- the map@Deprecated public long getTimeStamp()
getTimestamp()
insteadpublic long getTimestamp()
public MP setTimestamp(long timestamp)
timestamp
- the timestamppublic List<UUID> getClusterIds()
public MP setClusterIds(List<UUID> clusterIds)
clusterIds
- of the clusters that have consumed the mutationpublic org.apache.hadoop.hbase.security.visibility.CellVisibility getCellVisibility() throws org.apache.hadoop.hbase.exceptions.DeserializationException
org.apache.hadoop.hbase.exceptions.DeserializationException
- the deserialization exceptionpublic MP setCellVisibility(org.apache.hadoop.hbase.security.visibility.CellVisibility expression)
expression
- the expressionpublic byte[] getACL()
public MP setACL(String user, org.apache.hadoop.hbase.security.access.Permission perms)
user
- User short nameperms
- Permissions for the userpublic MP setACL(Map<String,org.apache.hadoop.hbase.security.access.Permission> perms)
perms
- A map of permissions for a user or userspublic long getTTL()
public MP setTTL(long ttl)
ttl
- the TTL desired for the result of the mutation, in millisecondspublic List<org.apache.hadoop.hbase.Cell> get(String family, String qualifier)
family
- column familyqualifier
- column qualifierpublic List<org.apache.hadoop.hbase.Cell> get(byte[] family, byte[] qualifier)
family
- column familyqualifier
- column qualifierpublic boolean has(String family, String qualifier)
family
- column familyqualifier
- column qualifierpublic boolean has(String family, String qualifier, long ts)
family
- column familyqualifier
- column qualifierts
- timestamppublic boolean has(String family, String qualifier, Object value)
family
- column familyqualifier
- column qualifiervalue
- value to checkpublic boolean has(String family, String qualifier, long ts, Object value)
family
- column familyqualifier
- column qualifierts
- timestampvalue
- value to checkpublic boolean has(byte[] family, byte[] qualifier)
family
- column familyqualifier
- column qualifierpublic boolean has(byte[] family, byte[] qualifier, long ts)
family
- column familyqualifier
- column qualifierts
- timestamppublic boolean has(byte[] family, byte[] qualifier, byte[] value)
family
- column familyqualifier
- column qualifiervalue
- value to checkpublic boolean has(byte[] family, byte[] qualifier, long ts, byte[] value)
family
- column familyqualifier
- column qualifierts
- timestampvalue
- value to checkpublic byte[] getRow()
public boolean isEmpty()
public int size()
public int numFamilies()
public long heapSize()
@Deprecated public int compareTo(org.apache.hadoop.hbase.client.Row d)
Row.COMPARATOR
insteadcompareTo
in interface Comparable<org.apache.hadoop.hbase.client.Row>
d
- the dpublic byte[] getAttribute(String name)
name
- the namepublic Map<String,byte[]> getAttributesMap()
public AP setAttribute(String name, Object value)
name
- the namevalue
- the valuepublic String getId()
public AP setId(String id)
id
- id to set for the scanpublic int getPriority()
public AP setPriority(int priority)
priority
- the prioritypublic Map<String,Object> toMap(int maxCols)
maxCols
- the max colspublic String toJSON() throws IOException
IOException
- Signals that an I/O exception has occurred.public String toJSON(int maxCols) throws IOException
maxCols
- the max colsIOException
- Signals that an I/O exception has occurred.public String toString(int maxCols)
maxCols
- the max colsCopyright © 2019. All rights reserved.