public final class AnyAppend extends Object
Append
in HBase to reduce the manual conversion between bytes and String/Object.Put
Modifier and Type | Method and Description |
---|---|
AnyAppend |
add(byte[] family,
byte[] qualifier,
byte[] value)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
addColumn(byte[], byte[], byte[]) instead |
AnyAppend |
add(org.apache.hadoop.hbase.Cell cell)
Add column and value to this Append operation.
|
AnyAppend |
addColumn(byte[] family,
byte[] qualifier,
byte[] value)
Add the specified column and value to this Append operation.
|
AnyAppend |
addColumn(String family,
String qualifier,
Object value) |
org.apache.hadoop.hbase.CellScanner |
cellScanner() |
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) |
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.
|
org.apache.hadoop.hbase.io.TimeRange |
getTimeRange()
Gets the TimeRange used for this append.
|
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() |
long |
heapSize() |
boolean |
isEmpty()
Method to check if the familyMap is empty.
|
boolean |
isReturnResults() |
int |
numFamilies() |
static AnyAppend |
of(org.apache.hadoop.hbase.client.Append appendToCopy) |
static AnyAppend |
of(byte[] rowKey) |
static AnyAppend |
of(byte[] rowKey,
int offset,
int length) |
static AnyAppend |
of(byte[] rowKey,
long timestamp,
NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> familyMap) |
static AnyAppend |
of(Object rowKey) |
AM |
setACL(Map<String,org.apache.hadoop.hbase.security.access.Permission> perms)
Sets the ACL.
|
AM |
setACL(String user,
org.apache.hadoop.hbase.security.access.Permission perms)
Sets the ACL.
|
AnyAppend |
setAttribute(String name,
byte[] value) |
AOWA |
setAttribute(String name,
Object value)
Sets the attribute.
|
AM |
setCellVisibility(org.apache.hadoop.hbase.security.visibility.CellVisibility expression)
Sets the visibility expression associated with cells in this Mutation.
|
AM |
setClusterIds(List<UUID> clusterIds)
Marks that the clusters with the given clusterIds have consumed the mutation.
|
AM |
setDurability(org.apache.hadoop.hbase.client.Durability d)
Set the durability for this mutation.
|
AM |
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 |
AOWA |
setId(String id)
This method allows you to set an identifier on an operation.
|
AOWA |
setPriority(int priority)
Sets the priority.
|
AnyAppend |
setReturnResults(boolean returnResults) |
AnyAppend |
setTimeRange(long minStamp,
long maxStamp)
Sets the TimeRange to be used on the Get for this append.
|
AM |
setTimestamp(long timestamp)
Set the timestamp of the delete.
|
AM |
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() |
String |
toJSON(int maxCols) |
Map<String,Object> |
toMap() |
Map<String,Object> |
toMap(int maxCols) |
String |
toString() |
String |
toString(int maxCols) |
org.apache.hadoop.hbase.client.Append |
val() |
public static AnyAppend of(byte[] rowKey)
public static AnyAppend of(byte[] rowKey, int offset, int length)
public static AnyAppend of(byte[] rowKey, long timestamp, NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> familyMap)
public static AnyAppend of(org.apache.hadoop.hbase.client.Append appendToCopy)
public org.apache.hadoop.hbase.client.Append val()
public AnyAppend setTimeRange(long minStamp, long maxStamp)
This is useful for when you have counters that only last for specific periods of time (ie. counters that are partitioned by time). By setting the range of valid times for this append, you can potentially gain some performance with a more optimal Get operation. Be careful adding the time range to this class as you will update the old cell if the time range doesn't include the latest cells.
This range is used as [minStamp, maxStamp).
minStamp
- minimum timestamp value, inclusivemaxStamp
- maximum timestamp value, exclusivepublic org.apache.hadoop.hbase.io.TimeRange getTimeRange()
public AnyAppend setReturnResults(boolean returnResults)
returnResults
- True (default) if the append operation should return the results.
A client that is not interested in the result can save network
bandwidth setting this to false.public boolean isReturnResults()
@Deprecated public AnyAppend add(byte[] family, byte[] qualifier, byte[] value)
addColumn(byte[], byte[], byte[])
insteadfamily
- family namequalifier
- column qualifiervalue
- value to append to specified columnpublic AnyAppend addColumn(byte[] family, byte[] qualifier, byte[] value)
family
- family namequalifier
- column qualifiervalue
- value to append to specified columnpublic AnyAppend add(org.apache.hadoop.hbase.Cell cell)
cell
- public 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 AM setDurability(org.apache.hadoop.hbase.client.Durability d)
d
- public NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> getFamilyCellMap()
@Deprecated public AM setFamilyCellMap(NavigableMap<byte[],List<org.apache.hadoop.hbase.Cell>> map)
Mutation.Mutation(byte[], long, NavigableMap)
insteadmap
- @Deprecated public long getTimeStamp()
getTimestamp()
insteadpublic long getTimestamp()
public AM setTimestamp(long timestamp)
timestamp
- public AM 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 AM setCellVisibility(org.apache.hadoop.hbase.security.visibility.CellVisibility expression)
expression
- public byte[] getACL()
public AM setACL(String user, org.apache.hadoop.hbase.security.access.Permission perms)
user
- User short nameperms
- Permissions for the userpublic AM setACL(Map<String,org.apache.hadoop.hbase.security.access.Permission> perms)
perms
- A map of permissions for a user or userspublic long getTTL()
public AM 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()
getRow
in interface org.apache.hadoop.hbase.client.Row
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>
compareTo
in interface org.apache.hadoop.hbase.client.Row
d
- public byte[] getAttribute(String name)
name
- public AOWA setAttribute(String name, Object value)
name
- value
- public String getId()
public AOWA setId(String id)
id
- id to set for the scanpublic int getPriority()
public AOWA setPriority(int priority)
priority
- public String toJSON()
public String toJSON(int maxCols)
maxCols
- public String toString(int maxCols)
maxCols
- Copyright © 2021. All rights reserved.