Package org.apache.hadoop.hbase.thrift2
Class ThriftUtilities
java.lang.Object
org.apache.hadoop.hbase.thrift2.ThriftUtilities
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addAttributes
(OperationWithAttributes op, Map<ByteBuffer, ByteBuffer> attributes) Adds all the attributes into the Operation objectstatic org.apache.hadoop.hbase.thrift2.generated.TAppend
static Append
appendFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TAppend append) static org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType
static BloomType
bloomFilterFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType in) static org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor
static ColumnFamilyDescriptor
columnFamilyDescriptorFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor in) static org.apache.hadoop.hbase.thrift2.generated.TCompareOp
compareOpFromHBase
(CompareOperator compareOp) static CompareOperator
compareOpFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TCompareOp tCompareOp) static org.apache.hadoop.hbase.thrift2.generated.TCompressionAlgorithm
static Compression.Algorithm
compressionAlgorithmFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TCompressionAlgorithm in) private static org.apache.hadoop.hbase.thrift2.generated.TConsistency
consistencyFromHBase
(Consistency consistency) private static Consistency
consistencyFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TConsistency tConsistency) static org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding
static DataBlockEncoding
dataBlockEncodingFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding in) static org.apache.hadoop.hbase.thrift2.generated.TDelete
static Delete
deleteFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TDelete in) Creates aDelete
(HBase) from aTDelete
(Thrift).static List<org.apache.hadoop.hbase.thrift2.generated.TDelete>
deletesFromHBase
(List<Delete> in) deletesFromThrift
(List<org.apache.hadoop.hbase.thrift2.generated.TDelete> in) Converts multipleTDelete
s (Thrift) into a list ofDelete
s (HBase).static org.apache.hadoop.hbase.thrift2.generated.TDeleteType
deleteTypeFromHBase
(Cell.Type type) private static org.apache.hadoop.hbase.thrift2.generated.TDurability
durabilityFromHBase
(Durability durability) private static Durability
durabilityFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TDurability tDurability) static byte[]
filterFromHBase
(Filter filter) static Filter
filterFromThrift
(byte[] filterBytes) private static LogQueryFilter.FilterByOperator
getFilterByFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tLogQueryFilter) static org.apache.hadoop.hbase.thrift2.generated.TGet
getFromHBase
(Get in) static Get
getFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TGet in) Creates aGet
(HBase) from aTGet
(Thrift).private static LogQueryFilter.Type
getLogTypeFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tSlowLogQueryFilter) static Set<org.apache.hadoop.hbase.thrift2.generated.TServerName>
getServerNamesFromHBase
(Set<ServerName> serverNames) static Set<ServerName>
getServerNamesFromThrift
(Set<org.apache.hadoop.hbase.thrift2.generated.TServerName> tServerNames) static List<org.apache.hadoop.hbase.thrift2.generated.TGet>
getsFromHBase
(List<Get> in) getsFromThrift
(List<org.apache.hadoop.hbase.thrift2.generated.TGet> in) Converts multipleTGet
s (Thrift) into a list ofGet
s (HBase).static org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter
getSlowLogQueryFromHBase
(LogQueryFilter logQueryFilter) static LogQueryFilter
getSlowLogQueryFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tLogQueryFilter) static List<org.apache.hadoop.hbase.thrift2.generated.TOnlineLogRecord>
getSlowLogRecordsFromHBase
(List<OnlineLogRecord> onlineLogRecords) static List<OnlineLogRecord>
getSlowLogRecordsFromThrift
(List<org.apache.hadoop.hbase.thrift2.generated.TOnlineLogRecord> tOnlineLogRecords) private static org.apache.hadoop.hbase.thrift2.generated.TFilterByOperator
getTFilterByFromHBase
(LogQueryFilter logQueryFilter) private static org.apache.hadoop.hbase.thrift2.generated.TLogType
gettLogTypeFromHBase
(LogQueryFilter logQueryFilter) static HTableDescriptor
hTableDescriptorFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor in) static HTableDescriptor[]
hTableDescriptorsFromThrift
(List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> in) static org.apache.hadoop.hbase.thrift2.generated.TIncrement
static Increment
incrementFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TIncrement in) static org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells
static KeepDeletedCells
keepDeletedCellsFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells in) static org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor
static NamespaceDescriptor
namespaceDescriptorFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor in) static List<org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor>
static NamespaceDescriptor[]
namespaceDescriptorsFromThrift
(List<org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor> in) static org.apache.hadoop.hbase.thrift2.generated.TPut
putFromHBase
(Put in) static Put
putFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TPut in) Creates aPut
(HBase) from aTPut
(Thrift)static List<org.apache.hadoop.hbase.thrift2.generated.TPut>
putsFromHBase
(List<Put> in) putsFromThrift
(List<org.apache.hadoop.hbase.thrift2.generated.TPut> in) Converts multipleTPut
s (Thrift) into a list ofPut
s (HBase).private static org.apache.hadoop.hbase.thrift2.generated.TReadType
readTypeFromHBase
(Scan.ReadType readType) private static Scan.ReadType
readTypeFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TReadType tReadType) static org.apache.hadoop.hbase.thrift2.generated.THRegionLocation
static List<org.apache.hadoop.hbase.thrift2.generated.THRegionLocation>
regionLocationsFromHBase
(List<HRegionLocation> locations) static org.apache.hadoop.hbase.thrift2.generated.TResult
Creates aTResult
(Thrift) from aResult
(HBase).static Result
resultFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TResult in) static List<org.apache.hadoop.hbase.thrift2.generated.TResult>
resultsFromHBase
(Result[] in) Converts multipleResult
s (HBase) into a list ofTResult
s (Thrift).static Result[]
resultsFromThrift
(List<org.apache.hadoop.hbase.thrift2.generated.TResult> in) static org.apache.hadoop.hbase.thrift2.generated.TRowMutations
static RowMutations
rowMutationsFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TRowMutations in) Creates aRowMutations
(HBase) from aTRowMutations
(Thrift)static org.apache.hadoop.hbase.thrift2.generated.TScan
scanFromHBase
(Scan in) static Scan
scanFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TScan in) static List<ByteBuffer>
splitKeyFromHBase
(byte[][] in) static byte[][]
static org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor
static TableDescriptor
tableDescriptorFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor in) static List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor>
static List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor>
static List<TableDescriptor>
tableDescriptorsFromThrift
(List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> in) static org.apache.hadoop.hbase.thrift2.generated.TTableName
tableNameFromHBase
(TableName table) static TableName
tableNameFromThrift
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) static TableName[]
tableNamesArrayFromThrift
(List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tableNames) static List<org.apache.hadoop.hbase.thrift2.generated.TTableName>
static List<org.apache.hadoop.hbase.thrift2.generated.TTableName>
tableNamesFromHBase
(TableName[] in) tableNamesFromThrift
(List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tableNames) static Cell
toCell
(ExtendedCellBuilder cellBuilder, byte[] row, org.apache.hadoop.hbase.thrift2.generated.TColumnValue columnValue)
-
Field Details
-
EMPTY_CELL_ARRAY
-
EMPTY_RESULT
-
EMPTY_RESULT_STALE
-
-
Constructor Details
-
ThriftUtilities
private ThriftUtilities()
-
-
Method Details
-
getFromThrift
public static Get getFromThrift(org.apache.hadoop.hbase.thrift2.generated.TGet in) throws IOException - Parameters:
in
- theTGet
to convert- Returns:
Get
object- Throws:
IOException
- if an invalid time range or max version parameter is given
-
getsFromThrift
public static List<Get> getsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TGet> in) throws IOException Converts multipleTGet
s (Thrift) into a list ofGet
s (HBase).- Parameters:
in
- list ofTGet
s to convert- Returns:
- list of
Get
objects - Throws:
IOException
- if an invalid time range or max version parameter is given- See Also:
-
resultFromHBase
Creates aTResult
(Thrift) from aResult
(HBase).- Parameters:
in
- theResult
to convert- Returns:
- converted result, returns an empty result if the input is
null
-
resultsFromHBase
Converts multipleResult
s (HBase) into a list ofTResult
s (Thrift).- Parameters:
in
- array ofResult
s to convert- Returns:
- list of converted
TResult
s - See Also:
-
putFromThrift
Creates aPut
(HBase) from aTPut
(Thrift)- Parameters:
in
- theTPut
to convert- Returns:
- converted
Put
-
putsFromThrift
Converts multipleTPut
s (Thrift) into a list ofPut
s (HBase).- Parameters:
in
- list ofTPut
s to convert- Returns:
- list of converted
Put
s - See Also:
-
deleteFromThrift
Creates aDelete
(HBase) from aTDelete
(Thrift).- Parameters:
in
- theTDelete
to convert- Returns:
- converted
Delete
-
deletesFromThrift
public static List<Delete> deletesFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TDelete> in) Converts multipleTDelete
s (Thrift) into a list ofDelete
s (HBase).- Parameters:
in
- list ofTDelete
s to convert- Returns:
- list of converted
Delete
s - See Also:
-
deleteTypeFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TDeleteType deleteTypeFromHBase(Cell.Type type) -
deleteFromHBase
-
rowMutationsFromThrift
public static RowMutations rowMutationsFromThrift(org.apache.hadoop.hbase.thrift2.generated.TRowMutations in) throws IOException Creates aRowMutations
(HBase) from aTRowMutations
(Thrift)- Parameters:
in
- theTRowMutations
to convert- Returns:
- converted
RowMutations
- Throws:
IOException
-
scanFromThrift
public static Scan scanFromThrift(org.apache.hadoop.hbase.thrift2.generated.TScan in) throws IOException - Throws:
IOException
-
filterFromHBase
- Throws:
IOException
-
filterFromThrift
- Throws:
IOException
-
scanFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TScan scanFromHBase(Scan in) throws IOException - Throws:
IOException
-
incrementFromThrift
public static Increment incrementFromThrift(org.apache.hadoop.hbase.thrift2.generated.TIncrement in) throws IOException - Throws:
IOException
-
appendFromThrift
public static Append appendFromThrift(org.apache.hadoop.hbase.thrift2.generated.TAppend append) throws IOException - Throws:
IOException
-
regionLocationFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.THRegionLocation regionLocationFromHBase(HRegionLocation hrl) -
regionLocationsFromHBase
public static List<org.apache.hadoop.hbase.thrift2.generated.THRegionLocation> regionLocationsFromHBase(List<HRegionLocation> locations) -
addAttributes
private static void addAttributes(OperationWithAttributes op, Map<ByteBuffer, ByteBuffer> attributes) Adds all the attributes into the Operation object -
durabilityFromThrift
private static Durability durabilityFromThrift(org.apache.hadoop.hbase.thrift2.generated.TDurability tDurability) -
compareOpFromThrift
public static CompareOperator compareOpFromThrift(org.apache.hadoop.hbase.thrift2.generated.TCompareOp tCompareOp) -
readTypeFromThrift
private static Scan.ReadType readTypeFromThrift(org.apache.hadoop.hbase.thrift2.generated.TReadType tReadType) -
readTypeFromHBase
private static org.apache.hadoop.hbase.thrift2.generated.TReadType readTypeFromHBase(Scan.ReadType readType) -
consistencyFromThrift
private static Consistency consistencyFromThrift(org.apache.hadoop.hbase.thrift2.generated.TConsistency tConsistency) -
tableNameFromThrift
public static TableName tableNameFromThrift(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) -
tableNamesArrayFromThrift
public static TableName[] tableNamesArrayFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tableNames) -
tableNamesFromThrift
public static List<TableName> tableNamesFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tableNames) -
tableNameFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TTableName tableNameFromHBase(TableName table) -
tableNamesFromHBase
public static List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tableNamesFromHBase(List<TableName> in) -
tableNamesFromHBase
public static List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tableNamesFromHBase(TableName[] in) -
splitKeyFromThrift
-
bloomFilterFromThrift
public static BloomType bloomFilterFromThrift(org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType in) -
compressionAlgorithmFromThrift
public static Compression.Algorithm compressionAlgorithmFromThrift(org.apache.hadoop.hbase.thrift2.generated.TCompressionAlgorithm in) -
dataBlockEncodingFromThrift
public static DataBlockEncoding dataBlockEncodingFromThrift(org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding in) -
keepDeletedCellsFromThrift
public static KeepDeletedCells keepDeletedCellsFromThrift(org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells in) -
columnFamilyDescriptorFromThrift
public static ColumnFamilyDescriptor columnFamilyDescriptorFromThrift(org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor in) -
namespaceDescriptorFromThrift
public static NamespaceDescriptor namespaceDescriptorFromThrift(org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor in) -
namespaceDescriptorFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor namespaceDescriptorFromHBase(NamespaceDescriptor in) -
namespaceDescriptorsFromHBase
public static List<org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor> namespaceDescriptorsFromHBase(NamespaceDescriptor[] in) -
tableDescriptorFromThrift
public static TableDescriptor tableDescriptorFromThrift(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor in) -
hTableDescriptorFromThrift
public static HTableDescriptor hTableDescriptorFromThrift(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor in) -
hTableDescriptorsFromThrift
public static HTableDescriptor[] hTableDescriptorsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> in) -
tableDescriptorsFromThrift
public static List<TableDescriptor> tableDescriptorsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> in) -
durabilityFromHBase
private static org.apache.hadoop.hbase.thrift2.generated.TDurability durabilityFromHBase(Durability durability) -
tableDescriptorFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor tableDescriptorFromHBase(TableDescriptor in) -
tableDescriptorsFromHBase
public static List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> tableDescriptorsFromHBase(List<TableDescriptor> in) -
tableDescriptorsFromHBase
public static List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> tableDescriptorsFromHBase(TableDescriptor[] in) -
bloomFilterFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType bloomFilterFromHBase(BloomType in) -
compressionAlgorithmFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TCompressionAlgorithm compressionAlgorithmFromHBase(Compression.Algorithm in) -
dataBlockEncodingFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding dataBlockEncodingFromHBase(DataBlockEncoding in) -
keepDeletedCellsFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells keepDeletedCellsFromHBase(KeepDeletedCells in) -
columnFamilyDescriptorFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor columnFamilyDescriptorFromHBase(ColumnFamilyDescriptor in) -
consistencyFromHBase
private static org.apache.hadoop.hbase.thrift2.generated.TConsistency consistencyFromHBase(Consistency consistency) -
getFromHBase
-
toCell
public static Cell toCell(ExtendedCellBuilder cellBuilder, byte[] row, org.apache.hadoop.hbase.thrift2.generated.TColumnValue columnValue) -
resultFromThrift
-
putFromHBase
-
putsFromHBase
-
namespaceDescriptorsFromThrift
public static NamespaceDescriptor[] namespaceDescriptorsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor> in) -
deletesFromHBase
public static List<org.apache.hadoop.hbase.thrift2.generated.TDelete> deletesFromHBase(List<Delete> in) -
appendFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TAppend appendFromHBase(Append in) throws IOException - Throws:
IOException
-
incrementFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TIncrement incrementFromHBase(Increment in) throws IOException - Throws:
IOException
-
rowMutationsFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TRowMutations rowMutationsFromHBase(RowMutations in) -
compareOpFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TCompareOp compareOpFromHBase(CompareOperator compareOp) -
splitKeyFromHBase
-
resultsFromThrift
public static Result[] resultsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TResult> in) -
getsFromHBase
-
getServerNamesFromHBase
public static Set<org.apache.hadoop.hbase.thrift2.generated.TServerName> getServerNamesFromHBase(Set<ServerName> serverNames) -
getServerNamesFromThrift
public static Set<ServerName> getServerNamesFromThrift(Set<org.apache.hadoop.hbase.thrift2.generated.TServerName> tServerNames) -
getSlowLogQueryFromHBase
public static org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter getSlowLogQueryFromHBase(LogQueryFilter logQueryFilter) -
gettLogTypeFromHBase
private static org.apache.hadoop.hbase.thrift2.generated.TLogType gettLogTypeFromHBase(LogQueryFilter logQueryFilter) -
getTFilterByFromHBase
private static org.apache.hadoop.hbase.thrift2.generated.TFilterByOperator getTFilterByFromHBase(LogQueryFilter logQueryFilter) -
getSlowLogQueryFromThrift
public static LogQueryFilter getSlowLogQueryFromThrift(org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tLogQueryFilter) -
getLogTypeFromThrift
private static LogQueryFilter.Type getLogTypeFromThrift(org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tSlowLogQueryFilter) -
getFilterByFromThrift
private static LogQueryFilter.FilterByOperator getFilterByFromThrift(org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tLogQueryFilter) -
getSlowLogRecordsFromHBase
public static List<org.apache.hadoop.hbase.thrift2.generated.TOnlineLogRecord> getSlowLogRecordsFromHBase(List<OnlineLogRecord> onlineLogRecords) -
getSlowLogRecordsFromThrift
public static List<OnlineLogRecord> getSlowLogRecordsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TOnlineLogRecord> tOnlineLogRecords)
-