@InterfaceAudience.Public public abstract class Mutation extends OperationWithAttributes implements Row, CellScannable, org.apache.hadoop.hbase.io.HeapSize
Modifier and Type | Field and Description |
---|---|
protected Durability |
durability |
protected NavigableMap<byte[],List<Cell>> |
familyMap |
static long |
MUTATION_OVERHEAD |
protected byte[] |
row |
protected long |
ts |
ID_ATRIBUTE
COMPARATOR
Modifier | Constructor and Description |
---|---|
protected |
Mutation()
empty construction.
|
protected |
Mutation(byte[] row,
long ts,
NavigableMap<byte[],List<Cell>> familyMap)
Construct the mutation with user defined data.
|
protected |
Mutation(Mutation clone) |
Modifier and Type | Method and Description |
---|---|
CellScanner |
cellScanner()
Returns A CellScanner over the contained
Cell s |
int |
compareTo(Row d)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
Row.COMPARATOR instead |
protected long |
extraHeapSize()
Subclasses should override this method to add the heap size of their own fields.
|
List<Cell> |
get(byte[] family,
byte[] qualifier)
Returns a list of all KeyValue objects with matching column family and qualifier.
|
byte[] |
getACL()
Returns The serialized ACL for this operation, or null if none
|
org.apache.hadoop.hbase.security.visibility.CellVisibility |
getCellVisibility()
Returns CellVisibility associated with cells in this Mutation.
|
List<UUID> |
getClusterIds()
Returns the set of clusterIds that have consumed the mutation
|
Durability |
getDurability()
Get the current durability
|
NavigableMap<byte[],List<Cell>> |
getFamilyCellMap()
Method for retrieving the put's familyMap n
|
Map<String,Object> |
getFingerprint()
Compile the column family (i.e.
|
byte[] |
getRow()
Method for retrieving the delete's row n
|
long |
getTimestamp()
Method for retrieving the timestamp.
|
long |
getTimeStamp()
Deprecated.
|
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.
|
protected boolean |
has(byte[] family,
byte[] qualifier,
long ts,
byte[] value,
boolean ignoreTS,
boolean ignoreValue)
Private method to determine if this object's familyMap contains the given value assigned to the
given family, qualifier and timestamp, respecting the 2 boolean arguments.
|
long |
heapSize()
Returns Calculate what Mutation adds to class heap size.
|
boolean |
isEmpty()
Method to check if the familyMap is empty
|
int |
numFamilies()
Returns the number of different families
|
Mutation |
setACL(Map<String,org.apache.hadoop.hbase.security.access.Permission> perms)
Set the ACL for this operation.
|
Mutation |
setACL(String user,
org.apache.hadoop.hbase.security.access.Permission perms)
Set the ACL for this operation.
|
Mutation |
setCellVisibility(org.apache.hadoop.hbase.security.visibility.CellVisibility expression)
Sets the visibility expression associated with cells in this Mutation.
|
Mutation |
setClusterIds(List<UUID> clusterIds)
Marks that the clusters with the given clusterIds have consumed the mutation
|
Mutation |
setDurability(Durability d)
Set the durability for this mutation n
|
Mutation |
setFamilyCellMap(NavigableMap<byte[],List<Cell>> map)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
Mutation(byte[], long, NavigableMap) instead |
Mutation |
setTimestamp(long timestamp)
Set the timestamp of the delete.
|
Mutation |
setTTL(long ttl)
Set the TTL desired for the result of the mutation, in milliseconds.
|
int |
size()
Number of KeyValues carried by this Mutation.
|
Map<String,Object> |
toMap(int maxCols)
Compile the details beyond the scope of getFingerprint (row, columns, timestamps, etc.) into a
Map along with the fingerprinted information.
|
getAttribute, getAttributeSize, getAttributesMap, getId, getPriority, setAttribute, setId, setPriority
public static final long MUTATION_OVERHEAD
protected byte[] row
protected long ts
protected Durability durability
protected NavigableMap<byte[],List<Cell>> familyMap
protected Mutation()
protected Mutation(byte[] row, long ts, NavigableMap<byte[],List<Cell>> familyMap)
row
- row. CAN'T be nullts
- timestampfamilyMap
- the map to collect all cells internally. CAN'T be nullpublic CellScanner cellScanner()
CellScannable
Cell
scellScanner
in interface CellScannable
public Map<String,Object> getFingerprint()
getFingerprint
in class Operation
public Map<String,Object> toMap(int maxCols)
public Mutation setDurability(Durability d)
public Durability getDurability()
public NavigableMap<byte[],List<Cell>> getFamilyCellMap()
@Deprecated public Mutation setFamilyCellMap(NavigableMap<byte[],List<Cell>> map)
Mutation(byte[], long, NavigableMap)
insteadpublic boolean isEmpty()
public byte[] getRow()
@Deprecated public int compareTo(Row d)
Row.COMPARATOR
insteadRow
compareTo
in interface Comparable<Row>
compareTo
in interface Row
@Deprecated public long getTimeStamp()
getTimestamp()
insteadpublic long getTimestamp()
public Mutation setClusterIds(List<UUID> clusterIds)
clusterIds
- of the clusters that have consumed the mutationpublic List<UUID> getClusterIds()
public Mutation setCellVisibility(org.apache.hadoop.hbase.security.visibility.CellVisibility expression)
public org.apache.hadoop.hbase.security.visibility.CellVisibility getCellVisibility() throws org.apache.hadoop.hbase.exceptions.DeserializationException
org.apache.hadoop.hbase.exceptions.DeserializationException
public int size()
public int numFamilies()
public long heapSize()
heapSize
in interface org.apache.hadoop.hbase.io.HeapSize
public byte[] getACL()
public Mutation setACL(String user, org.apache.hadoop.hbase.security.access.Permission perms)
user
- User short nameperms
- Permissions for the userpublic Mutation setACL(Map<String,org.apache.hadoop.hbase.security.access.Permission> perms)
perms
- A map of permissions for a user or userspublic long getTTL()
public Mutation setTTL(long ttl)
ttl
- the TTL desired for the result of the mutation, in milliseconds nprotected long extraHeapSize()
public Mutation setTimestamp(long timestamp)
public 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 List<Cell> get(byte[] family, byte[] qualifier)
family
- column familyqualifier
- column qualifierprotected boolean has(byte[] family, byte[] qualifier, long ts, byte[] value, boolean ignoreTS, boolean ignoreValue)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.