Package org.apache.hadoop.hbase.client
Class Operation
java.lang.Object
org.apache.hadoop.hbase.client.Operation
- Direct Known Subclasses:
OperationWithAttributes
Superclass for any type that maps to a potentially application-level query. (e.g. Put, Get,
Delete, Scan, Next, etc.) Contains methods for exposure to logging and debugging tools.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionProduces a Map containing a fingerprint which identifies the type and the static schema components of a query (i.e.toJSON()
Produces a JSON object sufficient for description of a query in a debugging or logging context.toJSON
(int maxCols) Produces a JSON object for fingerprint and details exposure in a parseable format.toMap()
Produces a Map containing a full summary of a query.toMap
(int maxCols) Produces a Map containing a summary of the details of a query beyond the scope of the fingerprint (i.e.toString()
Produces a string representation of this Operation.toString
(int maxCols) Produces a string representation of this Operation.
-
Field Details
-
DEFAULT_MAX_COLS
- See Also:
-
-
Constructor Details
-
Operation
public Operation()
-
-
Method Details
-
getFingerprint
Produces a Map containing a fingerprint which identifies the type and the static schema components of a query (i.e. column families)- Returns:
- a map containing fingerprint information (i.e. column families)
-
toMap
Produces a Map containing a summary of the details of a query beyond the scope of the fingerprint (i.e. columns, rows...)- Parameters:
maxCols
- a limit on the number of columns output prior to truncation- Returns:
- a map containing parameters of a query (i.e. rows, columns...)
-
toMap
Produces a Map containing a full summary of a query.- Returns:
- a map containing parameters of a query (i.e. rows, columns...)
-
toJSON
Produces a JSON object for fingerprint and details exposure in a parseable format.- Parameters:
maxCols
- a limit on the number of columns to include in the JSON- Returns:
- a JSONObject containing this Operation's information, as a string
- Throws:
IOException
-
toJSON
Produces a JSON object sufficient for description of a query in a debugging or logging context.- Returns:
- the produced JSON object, as a string
- Throws:
IOException
-
toString
Produces a string representation of this Operation. It defaults to a JSON representation, but falls back to a string representation of the fingerprint and details in the case of a JSON encoding failure.- Parameters:
maxCols
- a limit on the number of columns output in the summary prior to truncation- Returns:
- a JSON-parseable String
-
toString
Produces a string representation of this Operation. It defaults to a JSON representation, but falls back to a string representation of the fingerprint and details in the case of a JSON encoding failure.
-