Class ThriftUtilities

java.lang.Object
org.apache.hadoop.hbase.thrift.ThriftUtilities

@Private public class ThriftUtilities extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Append
    appendFromThrift(org.apache.hadoop.hbase.thrift.generated.TAppend tappend)
    From a TAppend create an Append.
    static List<org.apache.hadoop.hbase.thrift.generated.TCell>
    This utility method creates a list of Thrift TCell "struct" based on an Hbase Cell object.
    static List<org.apache.hadoop.hbase.thrift.generated.TCell>
    This utility method creates a list of Thrift TCell "struct" based on an Hbase Cell array.
    static org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor
    This utility method creates a new Thrift ColumnDescriptor "struct" based on an Hbase HColumnDescriptor object.
    colDescFromThrift(org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor in)
    This utility method creates a new Hbase HColumnDescriptor object based on a Thrift ColumnDescriptor "struct".
    static Increment
    incrementFromThrift(org.apache.hadoop.hbase.thrift.generated.TIncrement tincrement)
    From a TIncrement create an Increment.
    static List<org.apache.hadoop.hbase.thrift.generated.TRowResult>
     
    static List<org.apache.hadoop.hbase.thrift.generated.TRowResult>
    This utility method creates a list of Thrift TRowResult "struct" based on an array of Hbase RowResult objects.
    static List<org.apache.hadoop.hbase.thrift.generated.TRowResult>
    rowResultFromHBase(Result[] in, boolean sortColumns)
    This utility method creates a list of Thrift TRowResult "struct" based on an Hbase RowResult object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • colDescFromThrift

      public static HColumnDescriptor colDescFromThrift(org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor in) throws org.apache.hadoop.hbase.thrift.generated.IllegalArgument
      This utility method creates a new Hbase HColumnDescriptor object based on a Thrift ColumnDescriptor "struct".
      Parameters:
      in - Thrift ColumnDescriptor object
      Throws:
      org.apache.hadoop.hbase.thrift.generated.IllegalArgument - if the column name is empty
    • colDescFromHbase

      public static org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor colDescFromHbase(HColumnDescriptor in)
      This utility method creates a new Thrift ColumnDescriptor "struct" based on an Hbase HColumnDescriptor object. Hbase HColumnDescriptor object
      Returns:
      Thrift ColumnDescriptor
    • cellFromHBase

      public static List<org.apache.hadoop.hbase.thrift.generated.TCell> cellFromHBase(Cell in)
      This utility method creates a list of Thrift TCell "struct" based on an Hbase Cell object. The empty list is returned if the input is null. Hbase Cell object
      Returns:
      Thrift TCell array
    • cellFromHBase

      public static List<org.apache.hadoop.hbase.thrift.generated.TCell> cellFromHBase(Cell[] in)
      This utility method creates a list of Thrift TCell "struct" based on an Hbase Cell array. The empty list is returned if the input is null.
      Parameters:
      in - Hbase Cell array
      Returns:
      Thrift TCell array
    • rowResultFromHBase

      public static List<org.apache.hadoop.hbase.thrift.generated.TRowResult> rowResultFromHBase(Result[] in, boolean sortColumns)
      This utility method creates a list of Thrift TRowResult "struct" based on an Hbase RowResult object. The empty list is returned if the input is null. Hbase RowResult object This boolean dictates if row data is returned in a sorted order sortColumns = True will set TRowResult's sortedColumns member which is an ArrayList of TColumn struct sortColumns = False will set TRowResult's columns member which is a map of columnName and TCell struct
      Returns:
      Thrift TRowResult array
    • rowResultFromHBase

      public static List<org.apache.hadoop.hbase.thrift.generated.TRowResult> rowResultFromHBase(Result[] in)
      This utility method creates a list of Thrift TRowResult "struct" based on an array of Hbase RowResult objects. The empty list is returned if the input is null. Array of Hbase RowResult objects
      Returns:
      Thrift TRowResult array
    • rowResultFromHBase

      public static List<org.apache.hadoop.hbase.thrift.generated.TRowResult> rowResultFromHBase(Result in)
    • incrementFromThrift

      public static Increment incrementFromThrift(org.apache.hadoop.hbase.thrift.generated.TIncrement tincrement)
      From a TIncrement create an Increment.
      Parameters:
      tincrement - the Thrift version of an increment
      Returns:
      an increment that the TIncrement represented.
    • appendFromThrift

      public static Append appendFromThrift(org.apache.hadoop.hbase.thrift.generated.TAppend tappend)
      From a TAppend create an Append.
      Parameters:
      tappend - the Thrift version of an append.
      Returns:
      an increment that the TAppend represented.