public final class AnyPut extends Object
Put
in HBase to reduce the manual conversion between bytes and String/Object.Put
Modifier and Type | Method and Description |
---|---|
AnyPut |
add(org.apache.hadoop.hbase.Cell kv) |
AnyPut |
addColumn(byte[] family,
byte[] qualifier,
byte[] value)
Adds the column.
|
AnyPut |
addColumn(byte[] family,
byte[] qualifier,
long ts,
byte[] value)
Adds the column.
|
AnyPut |
addColumn(byte[] family,
ByteBuffer qualifier,
long ts,
ByteBuffer value)
Adds the column.
|
AnyPut |
addColumn(String family,
String qualifier,
long ts,
Object value)
Adds the column.
|
AnyPut |
addColumn(String family,
String qualifier,
Object value)
Adds the column.
|
AnyPut |
addImmutable(byte[] family,
byte[] qualifier,
byte[] value)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
add(Cell) and CellBuilder instead |
AnyPut |
addImmutable(byte[] family,
byte[] qualifier,
long ts,
byte[] value)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
add(Cell) and CellBuilder instead |
AnyPut |
addImmutable(byte[] family,
ByteBuffer qualifier,
long ts,
ByteBuffer value)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
add(Cell) and CellBuilder instead |
AnyPut |
addImmutable(String family,
String qualifier,
long ts,
Object value)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
add(Cell) and CellBuilder instead |
AnyPut |
addImmutable(String family,
String qualifier,
Object value)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
add(Cell) and CellBuilder instead |
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) |
static List<AnyPut> |
from(Collection<?> entities) |
static List<AnyPut> |
from(Collection<?> entities,
Collection<String> selectPropNames) |
static List<AnyPut> |
from(Collection<?> entities,
Collection<String> selectPropNames,
com.landawn.abacus.util.NamingPolicy namingPolicy) |
static List<AnyPut> |
from(Collection<?> entities,
com.landawn.abacus.util.NamingPolicy namingPolicy) |
static AnyPut |
from(Object entity) |
static AnyPut |
from(Object entity,
Collection<String> selectPropNames) |
static AnyPut |
from(Object entity,
Collection<String> selectPropNames,
com.landawn.abacus.util.NamingPolicy namingPolicy) |
static AnyPut |
from(Object entity,
com.landawn.abacus.util.NamingPolicy namingPolicy) |
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() |
long |
heapSize() |
boolean |
isEmpty()
Method to check if the familyMap is empty.
|
int |
numFamilies() |
static AnyPut |
of(ByteBuffer rowKey) |
static AnyPut |
of(ByteBuffer rowKey,
long timestamp) |
static AnyPut |
of(Object rowKey) |
static AnyPut |
of(Object rowKey,
boolean rowIsImmutable) |
static AnyPut |
of(Object rowKey,
int rowOffset,
int rowLength) |
static AnyPut |
of(Object rowKey,
int rowOffset,
int rowLength,
long timestamp) |
static AnyPut |
of(Object rowKey,
long timestamp) |
static AnyPut |
of(Object rowKey,
long timestamp,
boolean rowIsImmutable) |
static AnyPut |
of(org.apache.hadoop.hbase.client.Put putToCopy) |
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.
|
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.
|
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) |
static List<org.apache.hadoop.hbase.client.Put> |
toPut(Collection<?> entities) |
static List<org.apache.hadoop.hbase.client.Put> |
toPut(Collection<?> entities,
com.landawn.abacus.util.NamingPolicy namingPolicy) |
String |
toString() |
String |
toString(int maxCols) |
org.apache.hadoop.hbase.client.Put |
val() |
public static AnyPut of(Object rowKey, int rowOffset, int rowLength)
rowKey
- rowOffset
- rowLength
- public static AnyPut of(Object rowKey, int rowOffset, int rowLength, long timestamp)
rowKey
- rowOffset
- rowLength
- timestamp
- public static AnyPut of(Object rowKey, boolean rowIsImmutable)
rowKey
- rowIsImmutable
- public static AnyPut of(Object rowKey, long timestamp, boolean rowIsImmutable)
rowKey
- timestamp
- rowIsImmutable
- public static AnyPut of(ByteBuffer rowKey)
rowKey
- public static AnyPut of(ByteBuffer rowKey, long timestamp)
rowKey
- timestamp
- public static AnyPut of(org.apache.hadoop.hbase.client.Put putToCopy)
putToCopy
- public static AnyPut from(Object entity, com.landawn.abacus.util.NamingPolicy namingPolicy)
entity
- namingPolicy
- public static List<AnyPut> from(Collection<?> entities)
entities
- public static List<AnyPut> from(Collection<?> entities, com.landawn.abacus.util.NamingPolicy namingPolicy)
entities
- namingPolicy
- public static AnyPut from(Object entity, Collection<String> selectPropNames)
entity
- selectPropNames
- public static AnyPut from(Object entity, Collection<String> selectPropNames, com.landawn.abacus.util.NamingPolicy namingPolicy)
entity
- selectPropNames
- namingPolicy
- public static List<AnyPut> from(Collection<?> entities, Collection<String> selectPropNames)
entities
- selectPropNames
- public static List<AnyPut> from(Collection<?> entities, Collection<String> selectPropNames, com.landawn.abacus.util.NamingPolicy namingPolicy)
entities
- selectPropNames
- namingPolicy
- public org.apache.hadoop.hbase.client.Put val()
public AnyPut addColumn(String family, String qualifier, Object value)
family
- qualifier
- value
- public AnyPut addColumn(String family, String qualifier, long ts, Object value)
family
- qualifier
- ts
- value
- public AnyPut addColumn(byte[] family, byte[] qualifier, byte[] value)
family
- qualifier
- value
- public AnyPut addColumn(byte[] family, byte[] qualifier, long ts, byte[] value)
family
- qualifier
- ts
- value
- public AnyPut addColumn(byte[] family, ByteBuffer qualifier, long ts, ByteBuffer value)
family
- qualifier
- ts
- value
- @Deprecated public AnyPut addImmutable(String family, String qualifier, Object value)
add(Cell)
and CellBuilder
insteadaddColumn(byte[], byte[], byte[])
. This version expects
that the underlying arrays won't change. It's intended
for usage internal HBase to and for advanced client applications.family
- qualifier
- value
- @Deprecated public AnyPut addImmutable(String family, String qualifier, long ts, Object value)
add(Cell)
and CellBuilder
insteadaddColumn(byte[], byte[], long, byte[])
. This version expects
that the underlying arrays won't change. It's intended
for usage internal HBase to and for advanced client applications.family
- qualifier
- ts
- value
- @Deprecated public AnyPut addImmutable(byte[] family, byte[] qualifier, byte[] value)
add(Cell)
and CellBuilder
insteadaddColumn(byte[], byte[], byte[])
. This version expects
that the underlying arrays won't change. It's intended
for usage internal HBase to and for advanced client applications.family
- qualifier
- value
- @Deprecated public AnyPut addImmutable(byte[] family, byte[] qualifier, long ts, byte[] value)
add(Cell)
and CellBuilder
insteadaddColumn(byte[], byte[], long, byte[])
. This version expects
that the underlying arrays won't change. It's intended
for usage internal HBase to and for advanced client applications.family
- qualifier
- ts
- value
- @Deprecated public AnyPut addImmutable(byte[] family, ByteBuffer qualifier, long ts, ByteBuffer value)
add(Cell)
and CellBuilder
insteadaddColumn(byte[], byte[], long, byte[])
. This version expects
that the underlying arrays won't change. It's intended
for usage internal HBase to and for advanced client applications.family
- qualifier
- ts
- value
- public AnyPut add(org.apache.hadoop.hbase.Cell kv) throws IOException
kv
- IOException
- Signals that an I/O exception has occurred.public boolean equals(Object obj)
public String toString()
public static List<org.apache.hadoop.hbase.client.Put> toPut(Collection<?> entities)
entities
- AnyPut
or entity with getter/setter methodspublic static List<org.apache.hadoop.hbase.client.Put> toPut(Collection<?> entities, com.landawn.abacus.util.NamingPolicy namingPolicy)
entities
- AnyPut
or entity with getter/setter methodsnamingPolicy
- 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.