Class Operation

java.lang.Object
org.apache.hadoop.hbase.client.Operation
Direct Known Subclasses:
OperationWithAttributes

@Public public abstract class Operation extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    private static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Map<String,Object>
    Produces a Map containing a fingerprint which identifies the type and the static schema components of a query (i.e.
    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.
    Produces a Map containing a full summary of a query.
    abstract Map<String,Object>
    toMap(int maxCols)
    Produces a Map containing a summary of the details of a query beyond the scope of the fingerprint (i.e.
    Produces a string representation of this Operation.
    toString(int maxCols)
    Produces a string representation of this Operation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • getFingerprint

      public abstract Map<String,Object> 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

      public abstract Map<String,Object> toMap(int maxCols)
      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

      public Map<String,Object> toMap()
      Produces a Map containing a full summary of a query.
      Returns:
      a map containing parameters of a query (i.e. rows, columns...)
    • toJSON

      public String toJSON(int maxCols) throws IOException
      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

      public String toJSON() throws IOException
      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

      public String toString(int maxCols)
      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

      public 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.
      Overrides:
      toString in class Object