Package org.apache.hadoop.hbase.client
Class Put
java.lang.Object
org.apache.hadoop.hbase.client.Operation
org.apache.hadoop.hbase.client.OperationWithAttributes
org.apache.hadoop.hbase.client.Mutation
org.apache.hadoop.hbase.client.Put
- All Implemented Interfaces:
Comparable<Row>
,CellScannable
,Attributes
,Row
,HeapSize
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.client.Mutation
durability, familyMap, MUTATION_OVERHEAD, row, ts
Fields inherited from class org.apache.hadoop.hbase.client.OperationWithAttributes
ID_ATRIBUTE
Fields inherited from interface org.apache.hadoop.hbase.client.Row
COMPARATOR
-
Constructor Summary
ConstructorDescriptionPut
(byte[] row) Create a Put operation for the specified row.Put
(byte[] row, boolean rowIsImmutable) Create a Put operation for an immutable row key.Put
(byte[] rowArray, int rowOffset, int rowLength) We make a copy of the passed in row key to keep local.Put
(byte[] rowArray, int rowOffset, int rowLength, long ts) We make a copy of the passed in row key to keep local.Put
(byte[] row, long ts) Create a Put operation for the specified row, using a given timestamp.Put
(byte[] row, long ts, boolean rowIsImmutable) Create a Put operation for an immutable row key, using a given timestamp.Put
(byte[] row, long ts, NavigableMap<byte[], List<Cell>> familyMap) Construct the Put with user defined data.Put
(ByteBuffer row) Put
(ByteBuffer row, long ts) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionAdd the specified KeyValue to this Put operation.addColumn
(byte[] family, byte[] qualifier, byte[] value) Add the specified column and value to this Put operation.addColumn
(byte[] family, byte[] qualifier, long ts, byte[] value) Add the specified column and value, with the specified timestamp as its version to this Put operation.addColumn
(byte[] family, ByteBuffer qualifier, long ts, ByteBuffer value) Add the specified column and value, with the specified timestamp as its version to this Put operation.addImmutable
(byte[] family, byte[] qualifier, byte[] value) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0.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.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.setACL
(String user, Permission perms) Set the ACL for this operation.setACL
(Map<String, Permission> perms) Set the ACL for this operation.setAttribute
(String name, byte[] value) Sets an attribute.setCellVisibility
(CellVisibility expression) Sets the visibility expression associated with cells in this Mutation.setClusterIds
(List<UUID> clusterIds) Marks that the clusters with the given clusterIds have consumed the mutationSet the durability for this mutationsetFamilyCellMap
(NavigableMap<byte[], List<Cell>> map) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0.This method allows you to set an identifier on an operation.setPriority
(int priority) setTimestamp
(long timestamp) Set the timestamp of the delete.setTTL
(long ttl) Set the TTL desired for the result of the mutation, in milliseconds.Methods inherited from class org.apache.hadoop.hbase.client.Mutation
cellScanner, checkRow, checkRow, checkRow, compareTo, createPutKeyValue, createPutKeyValue, createPutKeyValue, extraHeapSize, get, getACL, getCellList, getCellVisibility, getClusterIds, getDurability, getFamilyCellMap, getFingerprint, getRow, getTimestamp, getTimeStamp, getTTL, has, has, has, has, has, heapSize, isEmpty, isReturnResults, numFamilies, setReturnResults, size, toCellVisibility, toMap
Methods inherited from class org.apache.hadoop.hbase.client.OperationWithAttributes
getAttribute, getAttributeSize, getAttributesMap, getId, getPriority
Methods inherited from class org.apache.hadoop.hbase.client.Operation
toJSON, toJSON, toMap, toString, toString
-
Constructor Details
-
Put
Create a Put operation for the specified row.- Parameters:
row
- row key
-
Put
Create a Put operation for the specified row, using a given timestamp.- Parameters:
row
- row key; we make a copy of what we are passed to keep local.ts
- timestamp
-
Put
We make a copy of the passed in row key to keep local. -
Put
- Parameters:
row
- row key; we make a copy of what we are passed to keep local.ts
- timestamp
-
Put
- Parameters:
row
- row key; we make a copy of what we are passed to keep local.
-
Put
We make a copy of the passed in row key to keep local. -
Put
Create a Put operation for an immutable row key.- Parameters:
row
- row keyrowIsImmutable
- whether the input row is immutable. Set to true if the caller can guarantee that the row will not be changed for the Put duration.
-
Put
Create a Put operation for an immutable row key, using a given timestamp.- Parameters:
row
- row keyts
- timestamprowIsImmutable
- whether the input row is immutable. Set to true if the caller can guarantee that the row will not be changed for the Put duration.
-
Put
Copy constructor. Creates a Put operation cloned from the specified Put.- Parameters:
putToCopy
- put to copy
-
-
Method Details
-
addColumn
Add the specified column and value to this Put operation.- Parameters:
family
- family namequalifier
- column qualifiervalue
- column value
-
addImmutable
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0. Useadd(Cell)
andCellBuilder
insteadSeeaddColumn(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. -
addColumn
Add the specified column and value, with the specified timestamp as its version to this Put operation.- Parameters:
family
- family namequalifier
- column qualifierts
- version timestampvalue
- column value
-
addImmutable
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0. Useadd(Cell)
andCellBuilder
insteadSeeaddColumn(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. -
addColumn
Add the specified column and value, with the specified timestamp as its version to this Put operation.- Parameters:
family
- family namequalifier
- column qualifierts
- version timestampvalue
- column value
-
addImmutable
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0. Useadd(Cell)
andCellBuilder
insteadSeeaddColumn(byte[], ByteBuffer, long, ByteBuffer)
. This version expects that the underlying arrays won't change. It's intended for usage internal HBase to and for advanced client applications. -
add
Add the specified KeyValue to this Put operation. Operation assumes that the passed KeyValue is immutable and its backing array will not be modified for the duration of this Put.- Overrides:
add
in classMutation
- Parameters:
cell
- individual cell- Throws:
IOException
- e
-
setTimestamp
Description copied from class:Mutation
Set the timestamp of the delete.- Overrides:
setTimestamp
in classMutation
-
setAttribute
Description copied from interface:Attributes
Sets an attribute. In case value = null attribute is removed from the attributes map. Attribute names starting with _ indicate system attributes.- Specified by:
setAttribute
in interfaceAttributes
- Overrides:
setAttribute
in classOperationWithAttributes
- Parameters:
name
- attribute namevalue
- attribute value
-
setId
Description copied from class:OperationWithAttributes
This method allows you to set an identifier on an operation. The original motivation for this was to allow the identifier to be used in slow query logging, but this could obviously be useful in other places. One use of this could be to put a class.method identifier in here to see where the slow query is coming from. id to set for the scan- Overrides:
setId
in classOperationWithAttributes
-
setDurability
Description copied from class:Mutation
Set the durability for this mutation- Overrides:
setDurability
in classMutation
-
setClusterIds
Description copied from class:Mutation
Marks that the clusters with the given clusterIds have consumed the mutation- Overrides:
setClusterIds
in classMutation
- Parameters:
clusterIds
- of the clusters that have consumed the mutation
-
setCellVisibility
Description copied from class:Mutation
Sets the visibility expression associated with cells in this Mutation.- Overrides:
setCellVisibility
in classMutation
-
setACL
Description copied from class:Mutation
Set the ACL for this operation. -
setACL
Description copied from class:Mutation
Set the ACL for this operation. -
setTTL
Description copied from class:Mutation
Set the TTL desired for the result of the mutation, in milliseconds. -
setPriority
- Overrides:
setPriority
in classOperationWithAttributes
-