Package org.apache.hadoop.hbase.thrift
Class ThriftUtilities
java.lang.Object
org.apache.hadoop.hbase.thrift.ThriftUtilities
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Append
appendFromThrift
(org.apache.hadoop.hbase.thrift.generated.TAppend tappend) From aTAppend
create anAppend
.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.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.static org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor
This utility method creates a new Thrift ColumnDescriptor "struct" based on an Hbase HColumnDescriptor object.static ColumnFamilyDescriptor
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 aTIncrement
create anIncrement
.static Permission.Action[]
permissionActionsFromString
(String permission_actions) static List<org.apache.hadoop.hbase.thrift.generated.TRowResult>
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.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.
-
Constructor Details
-
ThriftUtilities
private ThriftUtilities()
-
-
Method Details
-
colDescFromThrift
public static ColumnFamilyDescriptor 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(ColumnFamilyDescriptor in) This utility method creates a new Thrift ColumnDescriptor "struct" based on an Hbase HColumnDescriptor object. Hbase HColumnDescriptor object- Returns:
- Thrift ColumnDescriptor
-
cellFromHBase
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
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 aTIncrement
create anIncrement
.- Parameters:
tincrement
- the Thrift version of an increment- Returns:
- an increment that the
TIncrement
represented.
-
appendFromThrift
From aTAppend
create anAppend
.- Parameters:
tappend
- the Thrift version of an append.- Returns:
- an increment that the
TAppend
represented.
-
permissionActionsFromString
-