@InterfaceAudience.Private public class ThriftUtilities extends Object
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 Append |
appendFromThrift(org.apache.hadoop.hbase.thrift2.generated.TAppend append) |
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<Delete> |
deletesFromThrift(List<org.apache.hadoop.hbase.thrift2.generated.TDelete> in)
Converts multiple
TDelete s (Thrift) into a list of Delete s (HBase). |
private static Durability |
durabilityFromThrift(org.apache.hadoop.hbase.thrift2.generated.TDurability tDurability) |
static Get |
getFromThrift(org.apache.hadoop.hbase.thrift2.generated.TGet in)
Creates a
Get (HBase) from a TGet (Thrift). |
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 Increment |
incrementFromThrift(org.apache.hadoop.hbase.thrift2.generated.TIncrement in) |
static Put |
putFromThrift(org.apache.hadoop.hbase.thrift2.generated.TPut in)
Creates a
Put (HBase) from a TPut (Thrift) |
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). |
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 List<org.apache.hadoop.hbase.thrift2.generated.TResult> |
resultsFromHBase(Result[] in)
Converts multiple
Result s (HBase) into a list of TResult s (Thrift). |
static RowMutations |
rowMutationsFromThrift(org.apache.hadoop.hbase.thrift2.generated.TRowMutations in)
Creates a
RowMutations (HBase) from a TRowMutations (Thrift) |
static Scan |
scanFromThrift(org.apache.hadoop.hbase.thrift2.generated.TScan in) |
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.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 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)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.