Package org.apache.hadoop.hbase.client
Class OperationWithAttributes
java.lang.Object
org.apache.hadoop.hbase.client.Operation
org.apache.hadoop.hbase.client.OperationWithAttributes
- All Implemented Interfaces:
Attributes
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
empty construction.protected
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getAttribute
(String name) Gets an attributeprotected long
Gets all attributesgetId()
This method allows you to retrieve the identifier for the operation if one was set.int
setAttribute
(String name, byte[] value) Sets an attribute.This method allows you to set an identifier on an operation.setPriority
(int priority)
-
Field Details
-
attributes
-
ID_ATRIBUTE
- See Also:
-
priority
-
-
Constructor Details
-
OperationWithAttributes
protected OperationWithAttributes()empty construction. We need this empty construction to keep binary compatibility. -
OperationWithAttributes
-
-
Method Details
-
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
- Parameters:
name
- attribute namevalue
- attribute value
-
getAttribute
Description copied from interface:Attributes
Gets an attribute- Specified by:
getAttribute
in interfaceAttributes
- Parameters:
name
- attribute name- Returns:
- attribute value if attribute is set, null otherwise
-
getAttributesMap
Description copied from interface:Attributes
Gets all attributes- Specified by:
getAttributesMap
in interfaceAttributes
- Returns:
- unmodifiable map of all attributes
-
getAttributeSize
-
setId
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 -
getId
This method allows you to retrieve the identifier for the operation if one was set.- Returns:
- the id or null if not set
-
setPriority
-
getPriority
-