@InterfaceAudience.Private public class ThriftUtilities extends Object
Modifier and Type | Field and Description |
---|---|
private static Cell[] |
EMPTY_CELL_ARRAY |
private static Result |
EMPTY_RESULT |
private static Result |
EMPTY_RESULT_STALE |
Modifier | Constructor and Description |
---|---|
private |
ThriftUtilities() |
Modifier and Type | Method and Description |
---|---|
private static void |
addAttributes(OperationWithAttributes op,
Map<ByteBuffer,ByteBuffer> attributes)
Adds all the attributes into the Operation object
|
static org.apache.hadoop.hbase.thrift2.generated.TAppend |
appendFromHBase(Append in) |
static Append |
appendFromThrift(org.apache.hadoop.hbase.thrift2.generated.TAppend append) |
static org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType |
bloomFilterFromHBase(BloomType in) |
static BloomType |
bloomFilterFromThrift(org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType in) |
static org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor |
columnFamilyDescriptorFromHBase(ColumnFamilyDescriptor in) |
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 |
compressionAlgorithmFromHBase(Compression.Algorithm in) |
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 |
dataBlockEncodingFromHBase(DataBlockEncoding in) |
static DataBlockEncoding |
dataBlockEncodingFromThrift(org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding in) |
static org.apache.hadoop.hbase.thrift2.generated.TDelete |
deleteFromHBase(Delete in) |
static Delete |
deleteFromThrift(org.apache.hadoop.hbase.thrift2.generated.TDelete in)
Creates a
Delete (HBase) from a TDelete (Thrift). |
static List<org.apache.hadoop.hbase.thrift2.generated.TDelete> |
deletesFromHBase(List<Delete> in) |
static List<Delete> |
deletesFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TDelete> in)
Converts multiple
TDelete s (Thrift) into a list of Delete 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 a
Get (HBase) from a TGet (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) |
static List<Get> |
getsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TGet> in)
Converts multiple
TGet s (Thrift) into a list of Get 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 |
incrementFromHBase(Increment in) |
static Increment |
incrementFromThrift(org.apache.hadoop.hbase.thrift2.generated.TIncrement in) |
static org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells |
keepDeletedCellsFromHBase(KeepDeletedCells in) |
static KeepDeletedCells |
keepDeletedCellsFromThrift(org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells in) |
static org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor |
namespaceDescriptorFromHBase(NamespaceDescriptor in) |
static NamespaceDescriptor |
namespaceDescriptorFromThrift(org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor in) |
static List<org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor> |
namespaceDescriptorsFromHBase(NamespaceDescriptor[] in) |
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 a
Put (HBase) from a TPut (Thrift) |
static List<org.apache.hadoop.hbase.thrift2.generated.TPut> |
putsFromHBase(List<Put> in) |
static List<Put> |
putsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TPut> in)
Converts multiple
TPut s (Thrift) into a list of Put 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 |
regionLocationFromHBase(HRegionLocation hrl) |
static List<org.apache.hadoop.hbase.thrift2.generated.THRegionLocation> |
regionLocationsFromHBase(List<HRegionLocation> locations) |
static org.apache.hadoop.hbase.thrift2.generated.TResult |
resultFromHBase(Result in)
Creates a
TResult (Thrift) from a Result (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 multiple
Result s (HBase) into a list of TResult s (Thrift). |
static Result[] |
resultsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TResult> in) |
static org.apache.hadoop.hbase.thrift2.generated.TRowMutations |
rowMutationsFromHBase(RowMutations in) |
static RowMutations |
rowMutationsFromThrift(org.apache.hadoop.hbase.thrift2.generated.TRowMutations in)
Creates a
RowMutations (HBase) from a TRowMutations (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[][] |
splitKeyFromThrift(List<ByteBuffer> in) |
static org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor |
tableDescriptorFromHBase(TableDescriptor in) |
static TableDescriptor |
tableDescriptorFromThrift(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor in) |
static List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> |
tableDescriptorsFromHBase(List<TableDescriptor> in) |
static List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> |
tableDescriptorsFromHBase(TableDescriptor[] in) |
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> |
tableNamesFromHBase(List<TableName> in) |
static List<org.apache.hadoop.hbase.thrift2.generated.TTableName> |
tableNamesFromHBase(TableName[] in) |
static List<TableName> |
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) |
private static final Cell[] EMPTY_CELL_ARRAY
private static final Result EMPTY_RESULT
private static final Result EMPTY_RESULT_STALE
private ThriftUtilities()
public static Get getFromThrift(org.apache.hadoop.hbase.thrift2.generated.TGet in) throws IOException
in
- the TGet
to convertGet
objectIOException
- if an invalid time range or max version parameter is givenpublic static List<Get> getsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TGet> in) throws IOException
TGet
s (Thrift) into a list of Get
s (HBase).in
- list of TGet
s to convertGet
objectsIOException
- if an invalid time range or max version parameter is givengetFromThrift(TGet)
public static org.apache.hadoop.hbase.thrift2.generated.TResult resultFromHBase(Result in)
TResult
(Thrift) from a Result
(HBase).in
- the Result
to convertnull
public static List<org.apache.hadoop.hbase.thrift2.generated.TResult> resultsFromHBase(Result[] in)
Result
s (HBase) into a list of TResult
s (Thrift).in
- array of Result
s to convertTResult
sresultFromHBase(Result)
public static Put putFromThrift(org.apache.hadoop.hbase.thrift2.generated.TPut in)
Put
(HBase) from a TPut
(Thrift)in
- the TPut
to convertPut
public static List<Put> putsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TPut> in)
TPut
s (Thrift) into a list of Put
s (HBase).in
- list of TPut
s to convertPut
sputFromThrift(TPut)
public static Delete deleteFromThrift(org.apache.hadoop.hbase.thrift2.generated.TDelete in)
Delete
(HBase) from a TDelete
(Thrift).in
- the TDelete
to convertDelete
public static List<Delete> deletesFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TDelete> in)
TDelete
s (Thrift) into a list of Delete
s (HBase).in
- list of TDelete
s to convertDelete
sdeleteFromThrift(TDelete)
public static org.apache.hadoop.hbase.thrift2.generated.TDeleteType deleteTypeFromHBase(Cell.Type type)
public static org.apache.hadoop.hbase.thrift2.generated.TDelete deleteFromHBase(Delete in)
public static RowMutations rowMutationsFromThrift(org.apache.hadoop.hbase.thrift2.generated.TRowMutations in) throws IOException
RowMutations
(HBase) from a TRowMutations
(Thrift)in
- the TRowMutations
to convertRowMutations
IOException
public static Scan scanFromThrift(org.apache.hadoop.hbase.thrift2.generated.TScan in) throws IOException
IOException
public static byte[] filterFromHBase(Filter filter) throws IOException
IOException
public static Filter filterFromThrift(byte[] filterBytes) throws IOException
IOException
public static org.apache.hadoop.hbase.thrift2.generated.TScan scanFromHBase(Scan in) throws IOException
IOException
public static Increment incrementFromThrift(org.apache.hadoop.hbase.thrift2.generated.TIncrement in) throws IOException
IOException
public static Append appendFromThrift(org.apache.hadoop.hbase.thrift2.generated.TAppend append) throws IOException
IOException
public static org.apache.hadoop.hbase.thrift2.generated.THRegionLocation regionLocationFromHBase(HRegionLocation hrl)
public static List<org.apache.hadoop.hbase.thrift2.generated.THRegionLocation> regionLocationsFromHBase(List<HRegionLocation> locations)
private static void addAttributes(OperationWithAttributes op, Map<ByteBuffer,ByteBuffer> attributes)
private static Durability durabilityFromThrift(org.apache.hadoop.hbase.thrift2.generated.TDurability tDurability)
public static CompareOperator compareOpFromThrift(org.apache.hadoop.hbase.thrift2.generated.TCompareOp tCompareOp)
private static Scan.ReadType readTypeFromThrift(org.apache.hadoop.hbase.thrift2.generated.TReadType tReadType)
private static org.apache.hadoop.hbase.thrift2.generated.TReadType readTypeFromHBase(Scan.ReadType readType)
private static Consistency consistencyFromThrift(org.apache.hadoop.hbase.thrift2.generated.TConsistency tConsistency)
public static TableName tableNameFromThrift(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName)
public static TableName[] tableNamesArrayFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tableNames)
public static List<TableName> tableNamesFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tableNames)
public static org.apache.hadoop.hbase.thrift2.generated.TTableName tableNameFromHBase(TableName table)
public static List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tableNamesFromHBase(List<TableName> in)
public static List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tableNamesFromHBase(TableName[] in)
public static byte[][] splitKeyFromThrift(List<ByteBuffer> in)
public static BloomType bloomFilterFromThrift(org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType in)
public static Compression.Algorithm compressionAlgorithmFromThrift(org.apache.hadoop.hbase.thrift2.generated.TCompressionAlgorithm in)
public static DataBlockEncoding dataBlockEncodingFromThrift(org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding in)
public static KeepDeletedCells keepDeletedCellsFromThrift(org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells in)
public static ColumnFamilyDescriptor columnFamilyDescriptorFromThrift(org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor in)
public static NamespaceDescriptor namespaceDescriptorFromThrift(org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor in)
public static org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor namespaceDescriptorFromHBase(NamespaceDescriptor in)
public static List<org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor> namespaceDescriptorsFromHBase(NamespaceDescriptor[] in)
public static TableDescriptor tableDescriptorFromThrift(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor in)
public static HTableDescriptor hTableDescriptorFromThrift(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor in)
public static HTableDescriptor[] hTableDescriptorsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> in)
public static List<TableDescriptor> tableDescriptorsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> in)
private static org.apache.hadoop.hbase.thrift2.generated.TDurability durabilityFromHBase(Durability durability)
public static org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor tableDescriptorFromHBase(TableDescriptor in)
public static List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> tableDescriptorsFromHBase(List<TableDescriptor> in)
public static List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> tableDescriptorsFromHBase(TableDescriptor[] in)
public static org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType bloomFilterFromHBase(BloomType in)
public static org.apache.hadoop.hbase.thrift2.generated.TCompressionAlgorithm compressionAlgorithmFromHBase(Compression.Algorithm in)
public static org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding dataBlockEncodingFromHBase(DataBlockEncoding in)
public static org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells keepDeletedCellsFromHBase(KeepDeletedCells in)
public static org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor columnFamilyDescriptorFromHBase(ColumnFamilyDescriptor in)
private static org.apache.hadoop.hbase.thrift2.generated.TConsistency consistencyFromHBase(Consistency consistency)
public static org.apache.hadoop.hbase.thrift2.generated.TGet getFromHBase(Get in)
public static Cell toCell(ExtendedCellBuilder cellBuilder, byte[] row, org.apache.hadoop.hbase.thrift2.generated.TColumnValue columnValue)
public static Result resultFromThrift(org.apache.hadoop.hbase.thrift2.generated.TResult in)
public static org.apache.hadoop.hbase.thrift2.generated.TPut putFromHBase(Put in)
public static List<org.apache.hadoop.hbase.thrift2.generated.TPut> putsFromHBase(List<Put> in)
public static NamespaceDescriptor[] namespaceDescriptorsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor> in)
public static List<org.apache.hadoop.hbase.thrift2.generated.TDelete> deletesFromHBase(List<Delete> in)
public static org.apache.hadoop.hbase.thrift2.generated.TAppend appendFromHBase(Append in) throws IOException
IOException
public static org.apache.hadoop.hbase.thrift2.generated.TIncrement incrementFromHBase(Increment in) throws IOException
IOException
public static org.apache.hadoop.hbase.thrift2.generated.TRowMutations rowMutationsFromHBase(RowMutations in)
public static org.apache.hadoop.hbase.thrift2.generated.TCompareOp compareOpFromHBase(CompareOperator compareOp)
public static List<ByteBuffer> splitKeyFromHBase(byte[][] in)
public static Result[] resultsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TResult> in)
public static List<org.apache.hadoop.hbase.thrift2.generated.TGet> getsFromHBase(List<Get> in)
public static Set<org.apache.hadoop.hbase.thrift2.generated.TServerName> getServerNamesFromHBase(Set<ServerName> serverNames)
public static Set<ServerName> getServerNamesFromThrift(Set<org.apache.hadoop.hbase.thrift2.generated.TServerName> tServerNames)
public static org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter getSlowLogQueryFromHBase(LogQueryFilter logQueryFilter)
private static org.apache.hadoop.hbase.thrift2.generated.TLogType gettLogTypeFromHBase(LogQueryFilter logQueryFilter)
private static org.apache.hadoop.hbase.thrift2.generated.TFilterByOperator getTFilterByFromHBase(LogQueryFilter logQueryFilter)
public static LogQueryFilter getSlowLogQueryFromThrift(org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tLogQueryFilter)
private static LogQueryFilter.Type getLogTypeFromThrift(org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tSlowLogQueryFilter)
private static LogQueryFilter.FilterByOperator getFilterByFromThrift(org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tLogQueryFilter)
public static List<org.apache.hadoop.hbase.thrift2.generated.TOnlineLogRecord> getSlowLogRecordsFromHBase(List<OnlineLogRecord> onlineLogRecords)
public static List<OnlineLogRecord> getSlowLogRecordsFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TOnlineLogRecord> tOnlineLogRecords)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.