@InterfaceAudience.Public @InterfaceStability.Stable public class Append extends Mutation
This operation ensures atomicty to readers. Appends are done under a single row lock, so write operations to a row are synchronized, and readers are guaranteed to see this operation fully completed.
To append to a set of columns of a row, instantiate an Append object with the
row to append to. At least one column to append must be specified using the
add(byte[], byte[], byte[])
method.
durability, familyMap, MUTATION_OVERHEAD, RETURN_RESULTS, row, ts
ID_ATRIBUTE
Constructor and Description |
---|
Append(Append a)
Copy constructor
|
Append(byte[] row)
Create a Append operation for the specified row.
|
Append(byte[] rowArray,
int rowOffset,
int rowLength)
Create a Append operation for the specified row.
|
Modifier and Type | Method and Description |
---|---|
Append |
add(byte[] family,
byte[] qualifier,
byte[] value)
Add the specified column and value to this Append operation.
|
Append |
add(Cell cell)
Add column and value to this Append operation.
|
boolean |
isReturnResults() |
Append |
setACL(Map<String,Permission> perms) |
Append |
setACL(String user,
Permission perms) |
Append |
setAttribute(String name,
byte[] value)
Sets an attribute.
|
Append |
setCellVisibility(CellVisibility expression)
Sets the visibility expression associated with cells in this Mutation.
|
Append |
setClusterIds(List<UUID> clusterIds)
Marks that the clusters with the given clusterIds have consumed the mutation
|
Append |
setDurability(Durability d)
Set the durability for this mutation
|
Append |
setFamilyCellMap(NavigableMap<byte[],List<Cell>> map)
Method for setting the put's familyMap
|
Append |
setFamilyMap(NavigableMap<byte[],List<KeyValue>> map)
Deprecated.
|
Append |
setId(String id)
This method allows you to set an identifier on an operation.
|
Append |
setReturnResults(boolean returnResults) |
Append |
setTTL(long ttl)
Set the TTL desired for the result of the mutation, in milliseconds.
|
Append |
setWriteToWAL(boolean write)
Deprecated.
|
cellScanner, checkRow, checkRow, checkRow, compareTo, createPutKeyValue, createPutKeyValue, createPutKeyValue, extraHeapSize, getACL, getCellList, getCellVisibility, getClusterIds, getDurability, getFamilyCellMap, getFamilyMap, getFingerprint, getRow, getTimeStamp, getTTL, getWriteToWAL, heapSize, isEmpty, numFamilies, size, toMap
getAttribute, getAttributeSize, getAttributesMap, getId
public Append(byte[] row)
At least one column must be appended to.
row
- row key; makes a local copy of passed in array.public Append(Append a)
a
- public Append(byte[] rowArray, int rowOffset, int rowLength)
At least one column must be appended to.
rowArray
- Makes a copy out of this buffer.rowOffset
- rowLength
- public Append setReturnResults(boolean returnResults)
setReturnResults
in class Mutation
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()
isReturnResults
in class Mutation
public Append add(byte[] family, byte[] qualifier, byte[] value)
family
- family namequalifier
- column qualifiervalue
- value to append to specified columnpublic Append add(Cell cell)
cell
- public Append setAttribute(String name, byte[] value)
Attributes
setAttribute
in interface Attributes
setAttribute
in class OperationWithAttributes
name
- attribute namevalue
- attribute valuepublic Append setId(String id)
OperationWithAttributes
setId
in class OperationWithAttributes
id
- id to set for the scan@Deprecated public Append setWriteToWAL(boolean write)
Mutation
Mutation.setDurability(Durability)
setWriteToWAL
in class Mutation
write
- true if edits should be written to WAL, false if notpublic Append setDurability(Durability d)
Mutation
setDurability
in class Mutation
public Append setFamilyCellMap(NavigableMap<byte[],List<Cell>> map)
Mutation
setFamilyCellMap
in class Mutation
@Deprecated public Append setFamilyMap(NavigableMap<byte[],List<KeyValue>> map)
Mutation
setFamilyMap
in class Mutation
public Append setClusterIds(List<UUID> clusterIds)
Mutation
setClusterIds
in class Mutation
clusterIds
- of the clusters that have consumed the mutationpublic Append setCellVisibility(CellVisibility expression)
Mutation
setCellVisibility
in class Mutation
public Append setACL(String user, Permission perms)
public Append setACL(Map<String,Permission> perms)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.