@InterfaceAudience.Private public final class ProtobufUtil extends Object
ProtobufUtil| Modifier and Type | Method and Description |
|---|---|
static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CloseRegionRequest |
buildCloseRegionRequest(org.apache.hadoop.hbase.ServerName server,
byte[] regionName)
Create a CloseRegionRequest for a given region name
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CloseRegionRequest |
buildCloseRegionRequest(org.apache.hadoop.hbase.ServerName server,
byte[] regionName,
org.apache.hadoop.hbase.ServerName destinationServer) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetStoreFileRequest |
buildGetStoreFileRequest(byte[] regionName,
byte[] family)
Create a protocol buffer GetStoreFileRequest for a given region name
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription |
buildProcedureDescription(String signature,
String instance,
Map<String,String> props) |
static <T> T |
call(Callable<T> callable)
Contain ServiceException inside here.
|
static void |
closeRegion(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
org.apache.hadoop.hbase.ServerName server,
byte[] regionName)
A helper to close a region given a region name
using admin protocol.
|
static CompactionState |
createCompactionState(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState state)
Creates
CompactionState from
AdminProtos.GetRegionInfoResponse.CompactionState
state |
static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState |
createCompactionState(CompactionState state) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription |
createHBaseProtosSnapshotDesc(SnapshotDescription snapshotDesc)
Convert from
SnapshotDescription to
HBaseProtos.SnapshotDescription |
static org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type |
createProtosSnapShotDescType(SnapshotType type)
Creates
HBaseProtos.SnapshotDescription.Type
from SnapshotType |
static org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type |
createProtosSnapShotDescType(String snapshotDesc)
Creates
HBaseProtos.SnapshotDescription.Type
from the type of SnapshotDescription string |
static RegionLoadStats |
createRegionLoadStats(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.RegionLoadStats stats) |
static SnapshotDescription |
createSnapshotDesc(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshotDesc)
Convert from
HBaseProtos.SnapshotDescription to
SnapshotDescription |
static SnapshotType |
createSnapshotType(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type type)
Creates
SnapshotType from the type of
HBaseProtos.SnapshotDescription |
static void |
expectPBMagicPrefix(byte[] bytes) |
static org.apache.hadoop.hbase.KeyValue.Type |
fromDeleteType(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.DeleteType type)
Convert a protocol buffer DeleteType to delete KeyValue type.
|
static List<RegionInfo> |
getOnlineRegions(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin)
A helper to get the all the online regions on a region
server using admin protocol.
|
static List<RegionInfo> |
getOnlineRegions(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin)
A helper to get the all the online regions on a region
server using admin protocol.
|
static String |
getRegionEncodedName(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionSpecifier regionSpecifier)
Find the HRegion encoded name based on a region specifier
|
static RegionInfo |
getRegionInfo(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
byte[] regionName)
A helper to retrieve region info given a region name
using admin protocol.
|
static List<RegionInfo> |
getRegionInfos(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionResponse proto)
Get the list of region info from a GetOnlineRegionResponse
|
static List<RegionLoad> |
getRegionLoadInfo(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionLoadResponse regionLoadResponse) |
static IOException |
getRemoteException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se)
Return the IOException thrown by the remote server wrapped in
ServiceException as cause.
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ServerInfo |
getServerInfo(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin)
A helper to get the info of a region server using admin protocol.
|
static String |
getShortTextFormat(org.apache.hbase.thirdparty.com.google.protobuf.Message m)
Return short version of Message toString'd, shorter than TextFormat#shortDebugString.
|
static byte[][] |
getSplitKeysArray(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.CreateTableRequest proto)
get the split keys in form "byte [][]" from a CreateTableRequest proto
|
static List<String> |
getStoreFiles(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
byte[] regionName,
byte[] family)
A helper to get the list of files of a column family
on a given region using admin protocol.
|
static List<String> |
getStoreFiles(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
byte[] regionName,
byte[] family)
A helper to get the list of files of a column family
on a given region using admin protocol.
|
static org.apache.hadoop.hbase.TableName[] |
getTableNameArray(List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableName> tableNamesList) |
static long |
getTotalRequestsCount(org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionLoad rl) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo |
getVersionInfo()
Get a protocol buffer VersionInfo
|
static IOException |
handleRemoteException(Exception e)
Like
getRemoteException(ServiceException) but more generic, able to handle more than
just ServiceException. |
static boolean |
isClassLoaderLoaded() |
static boolean |
isPBMagicPrefix(byte[] bytes) |
static boolean |
isPBMagicPrefix(byte[] bytes,
int offset,
int len) |
static int |
lengthOfPBMagic() |
static void |
mergeDelimitedFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
InputStream in)
This version of protobuf's mergeDelimitedFrom avoid the hard-coded 64MB limit for decoding
buffers
|
static void |
mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
byte[] b)
This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding
buffers when working with byte arrays
|
static void |
mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
byte[] b,
int offset,
int length)
This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding
buffers when working with byte arrays
|
static void |
mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
org.apache.hbase.thirdparty.com.google.protobuf.ByteString bs)
This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding
buffers when working with ByteStrings
|
static void |
mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream codedInput,
int length) |
static void |
mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
InputStream in)
This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding
buffers where the message size is not known
|
static void |
mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
InputStream in,
int size)
This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding
buffers where the message size is known
|
static <T extends org.apache.hbase.thirdparty.com.google.protobuf.Service> |
newServiceStub(Class<T> service,
org.apache.hbase.thirdparty.com.google.protobuf.RpcChannel channel) |
static void |
openRegion(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
org.apache.hadoop.hbase.ServerName server,
RegionInfo region)
A helper to open a region using admin protocol.
|
static org.apache.hadoop.hbase.ServerName |
parseServerNameFrom(byte[] data)
Get a ServerName from the passed in data bytes.
|
static byte[] |
prependPBMagic(byte[] bytes)
Prepend the passed bytes with four bytes of magic,
ProtobufMagic.PB_MAGIC,
to flag what follows as a protobuf in hbase. |
static Append |
toAppend(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto,
org.apache.hadoop.hbase.CellScanner cellScanner)
Convert a protocol buffer Mutate to an Append
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Authorizations |
toAuthorizations(Authorizations authorizations)
Create a protocol buffer Authorizations based on a client Authorizations.
|
static Authorizations |
toAuthorizations(byte[] protoBytes)
Convert a protocol buffer Authorizations bytes to a client Authorizations
|
static Authorizations |
toAuthorizations(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Authorizations proto)
Convert a protocol buffer Authorizations to a client Authorizations
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.BulkLoadDescriptor |
toBulkLoadDescriptor(org.apache.hadoop.hbase.TableName tableName,
org.apache.hbase.thirdparty.com.google.protobuf.ByteString encodedRegionName,
Map<byte[],List<org.apache.hadoop.fs.Path>> storeFiles,
Map<String,Long> storeFilesSize,
long bulkloadSeqId)
Generates a marker for the WAL so that we propagate the notion of a bulk region load
throughout the WAL.
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ComparatorProtos.ByteArrayComparable |
toByteArrayComparable(byte[] value) |
static byte[] |
toBytes(org.apache.hbase.thirdparty.com.google.protobuf.ByteString bs) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.CacheEvictionStats |
toCacheEvictionStats(CacheEvictionStats cacheEvictionStats) |
static CacheEvictionStats |
toCacheEvictionStats(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.CacheEvictionStats stats) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.CellProtos.Cell |
toCell(org.apache.hadoop.hbase.Cell kv) |
static org.apache.hadoop.hbase.Cell |
toCell(org.apache.hadoop.hbase.ExtendedCellBuilder cellBuilder,
org.apache.hadoop.hbase.shaded.protobuf.generated.CellProtos.Cell cell) |
static CellVisibility |
toCellVisibility(byte[] protoBytes)
Convert a protocol buffer CellVisibility bytes to a client CellVisibility
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CellVisibility |
toCellVisibility(CellVisibility cellVisibility)
Create a protocol buffer CellVisibility based on a client CellVisibility.
|
static CellVisibility |
toCellVisibility(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CellVisibility proto)
Convert a protocol buffer CellVisibility to a client CellVisibility
|
static ColumnFamilyDescriptor |
toColumnFamilyDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ColumnFamilySchema cfs)
Converts a ColumnFamilySchema to ColumnFamilyDescriptor
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ColumnFamilySchema |
toColumnFamilySchema(ColumnFamilyDescriptor hcd)
Converts an ColumnFamilyDescriptor to ColumnFamilySchema
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.CompactionDescriptor |
toCompactionDescriptor(RegionInfo info,
byte[] regionName,
byte[] family,
List<org.apache.hadoop.fs.Path> inputPaths,
List<org.apache.hadoop.fs.Path> outputPaths,
org.apache.hadoop.fs.Path storeDir) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.CompactionDescriptor |
toCompactionDescriptor(RegionInfo info,
byte[] family,
List<org.apache.hadoop.fs.Path> inputPaths,
List<org.apache.hadoop.fs.Path> outputPaths,
org.apache.hadoop.fs.Path storeDir) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ComparatorProtos.Comparator |
toComparator(org.apache.hadoop.hbase.filter.ByteArrayComparable comparator)
Convert a ByteArrayComparable to a protocol buffer Comparator
|
static org.apache.hadoop.hbase.filter.ByteArrayComparable |
toComparator(org.apache.hadoop.hbase.shaded.protobuf.generated.ComparatorProtos.Comparator proto)
Convert a protocol buffer Comparator to a ByteArrayComparable
|
static Consistency |
toConsistency(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Consistency consistency) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Consistency |
toConsistency(Consistency consistency) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Cursor |
toCursor(org.apache.hadoop.hbase.Cell cell) |
static Cursor |
toCursor(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Cursor cursor) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Cursor |
toCursor(Cursor cursor) |
static Delete |
toDelete(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto)
Convert a protocol buffer Mutate to a Delete
|
static Delete |
toDelete(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto,
org.apache.hadoop.hbase.CellScanner cellScanner)
Convert a protocol buffer Mutate to a Delete
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.DeleteType |
toDeleteType(org.apache.hadoop.hbase.KeyValue.Type type)
Convert a delete KeyValue type to protocol buffer DeleteType.
|
static byte[] |
toDelimitedByteArray(org.apache.hbase.thirdparty.com.google.protobuf.Message m) |
static Durability |
toDurability(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Durability proto)
Convert a protobuf Durability into a client Durability
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Durability |
toDurability(Durability d)
Convert a client Durability into a protbuf Durability
|
static Throwable |
toException(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair parameter)
Convert a stringified protocol buffer exception Parameter to a Java Exception
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos.Filter |
toFilter(Filter filter)
Convert a client Filter to a protocol buffer Filter
|
static Filter |
toFilter(org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos.Filter proto)
Convert a protocol buffer Filter to a client Filter
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.FlushDescriptor |
toFlushDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.FlushDescriptor.FlushAction action,
RegionInfo hri,
long flushSeqId,
Map<byte[],List<org.apache.hadoop.fs.Path>> committedFiles) |
static Get |
toGet(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Get proto)
Convert a protocol buffer Get to a client Get
|
static Get |
toGet(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto,
org.apache.hadoop.hbase.CellScanner cellScanner)
Convert a protocol buffer Mutate to a Get.
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Get |
toGet(Get get)
Create a protocol buffer Get based on a client Get.
|
static Increment |
toIncrement(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto,
org.apache.hadoop.hbase.CellScanner cellScanner)
Convert a protocol buffer Mutate to an Increment
|
static void |
toIOException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se)
Unwraps an exception from a protobuf service into the underlying (expected) IOException.
|
static String |
toLockJson(List<org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockedResource> lockedResourceProtos) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto |
toMutation(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto |
toMutation(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Builder builder) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto |
toMutation(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Builder builder,
long nonce) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto |
toMutation(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation,
long nonce)
Create a protocol buffer Mutate based on a client Mutation
|
static Mutation |
toMutation(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto)
Convert a MutateRequest to Mutation
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto |
toMutationNoData(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation)
Create a protocol buffer MutationProto based on a client Mutation.
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto |
toMutationNoData(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Builder builder)
Create a protocol buffer MutationProto based on a client Mutation.
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto |
toMutationNoData(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Builder builder,
long nonce) |
static org.apache.hadoop.hbase.NamespaceDescriptor |
toNamespaceDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NamespaceDescriptor desc) |
static List<org.apache.hadoop.hbase.NamespaceDescriptor> |
toNamespaceDescriptorList(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListNamespaceDescriptorsResponse proto)
Get a list of NamespaceDescriptor from ListNamespaceDescriptorsResponse protobuf
|
static Optional<Long> |
toOptionalTimestamp(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MajorCompactionTimestampResponse resp) |
static String |
toProcedureJson(List<org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure> procProtos)
Helper to convert the protobuf Procedure to JSON String
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NamespaceDescriptor |
toProtoNamespaceDescriptor(org.apache.hadoop.hbase.NamespaceDescriptor ns) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.QuotaScope |
toProtoQuotaScope(QuotaScope scope)
Convert a client QuotaScope to a protocol buffer QuotaScope
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.QuotaType |
toProtoQuotaScope(QuotaType type)
Convert a client QuotaType to a protocol buffer QuotaType
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota |
toProtoSpaceQuota(long limit,
SpaceViolationPolicy violationPolicy)
Builds a protocol buffer SpaceQuota.
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableName |
toProtoTableName(org.apache.hadoop.hbase.TableName tableName) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleType |
toProtoThrottleType(ThrottleType type)
Convert a client ThrottleType to a protocol buffer ThrottleType
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TimeUnit |
toProtoTimeUnit(TimeUnit timeUnit)
Convert a client TimeUnit to a protocol buffer TimeUnit
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceViolationPolicy |
toProtoViolationPolicy(SpaceViolationPolicy policy)
Converts a client SpaceViolationPolicy to a protocol buffer SpaceViolationPolicy.
|
static Put |
toPut(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto)
Convert a protocol buffer Mutate to a Put.
|
static Put |
toPut(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto,
org.apache.hadoop.hbase.CellScanner cellScanner)
Convert a protocol buffer Mutate to a Put.
|
static QuotaScope |
toQuotaScope(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.QuotaScope proto)
Convert a protocol buffer QuotaScope to a client QuotaScope
|
static QuotaType |
toQuotaScope(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.QuotaType proto)
Convert a protocol buffer QuotaType to a client QuotaType
|
static Scan.ReadType |
toReadType(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Scan.ReadType readType) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Scan.ReadType |
toReadType(Scan.ReadType readType) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.RegionEventDescriptor |
toRegionEventDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.RegionEventDescriptor.EventType eventType,
byte[] tableNameAsBytes,
byte[] encodedNameAsBytes,
byte[] regionNameAsBytes,
long seqId,
org.apache.hadoop.hbase.ServerName server,
Map<byte[],List<org.apache.hadoop.fs.Path>> storeFiles) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.RegionEventDescriptor |
toRegionEventDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.RegionEventDescriptor.EventType eventType,
RegionInfo hri,
long seqId,
org.apache.hadoop.hbase.ServerName server,
Map<byte[],List<org.apache.hadoop.fs.Path>> storeFiles) |
static RegionInfo |
toRegionInfo(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionInfo proto)
Convert HBaseProto.RegionInfo to a RegionInfo
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionInfo |
toRegionInfo(RegionInfo info)
Convert a RegionInfo to a Proto RegionInfo
|
static HRegionLocation |
toRegionLocation(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionLocation proto) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionLocation |
toRegionLocation(HRegionLocation loc) |
static ReplicationLoadSink |
toReplicationLoadSink(org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ReplicationLoadSink rls) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ReplicationLoadSink |
toReplicationLoadSink(ReplicationLoadSink rls) |
static ReplicationLoadSource |
toReplicationLoadSource(org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ReplicationLoadSource rls) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ReplicationLoadSource |
toReplicationLoadSource(ReplicationLoadSource rls) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Result |
toResult(boolean existence,
boolean stale)
Convert a client Result to a protocol buffer Result
|
static Result |
toResult(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Result proto)
Convert a protocol buffer Result to a client Result
|
static Result |
toResult(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Result proto,
org.apache.hadoop.hbase.CellScanner scanner)
Convert a protocol buffer Result to a client Result
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Result |
toResult(Result result)
Convert a client Result to a protocol buffer Result
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Result |
toResultNoData(Result result)
Convert a client Result to a protocol buffer Result.
|
static Scan |
toScan(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Scan proto)
Convert a protocol buffer Scan to a client Scan
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Scan |
toScan(Scan scan)
Convert a client Scan to a protocol buffer Scan
|
static ScanMetrics |
toScanMetrics(byte[] bytes) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.MapReduceProtos.ScanMetrics |
toScanMetrics(ScanMetrics scanMetrics,
boolean reset) |
static List<SecurityCapability> |
toSecurityCapabilityList(List<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SecurityCapabilitiesResponse.Capability> capabilities)
Convert SecurityCapabilitiesResponse.Capability to SecurityCapability
|
static org.apache.hadoop.hbase.ServerName |
toServerName(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName proto)
Convert a protocol buffer ServerName to a ServerName
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName |
toServerName(org.apache.hadoop.hbase.ServerName serverName)
Convert a ServerName to a protocol buffer ServerName
|
static List<org.apache.hadoop.hbase.ServerName> |
toServerNameList(List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName> proto)
Convert a list of protocol buffer ServerName to a list of ServerName
|
static List<SnapshotDescription> |
toSnapshotDescriptionList(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetCompletedSnapshotsResponse response,
Pattern pattern) |
static TableDescriptor |
toTableDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableSchema ts)
Converts a TableSchema to TableDescriptor
|
static List<TableDescriptor> |
toTableDescriptorList(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableDescriptorsResponse proto)
Get a list of TableDescriptor from GetTableDescriptorsResponse protobuf
|
static List<TableDescriptor> |
toTableDescriptorList(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListTableDescriptorsByNamespaceResponse proto)
Get a list of TableDescriptor from ListTableDescriptorsByNamespaceResponse protobuf
|
static org.apache.hadoop.hbase.TableName |
toTableName(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableName tableNamePB) |
static List<org.apache.hadoop.hbase.TableName> |
toTableNameList(List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableName> tableNamesList) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableSchema |
toTableSchema(TableDescriptor htd)
Converts an TableDescriptor to TableSchema
|
static String |
toText(org.apache.hbase.thirdparty.com.google.protobuf.Message msg) |
static ThrottleType |
toThrottleType(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleType proto)
Convert a protocol buffer ThrottleType to a client ThrottleType
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.TimedQuota |
toTimedQuota(long limit,
TimeUnit timeUnit,
QuotaScope scope)
Build a protocol buffer TimedQuota
|
static org.apache.hadoop.hbase.io.TimeRange |
toTimeRange(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TimeRange timeRange) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TimeRange |
toTimeRange(org.apache.hadoop.hbase.io.TimeRange timeRange) |
static TimeUnit |
toTimeUnit(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TimeUnit proto)
Convert a protocol buffer TimeUnit to a client TimeUnit
|
static SpaceViolationPolicy |
toViolationPolicy(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceViolationPolicy proto)
Converts a protocol buffer SpaceViolationPolicy to a client SpaceViolationPolicy.
|
static void |
warmupRegion(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
RegionInfo regionInfo)
A helper to warmup a region given a region name
using admin protocol
|
public static boolean isClassLoaderLoaded()
public static byte[] prependPBMagic(byte[] bytes)
ProtobufMagic.PB_MAGIC,
to flag what follows as a protobuf in hbase. Prepend these bytes to all content written to
znodes, etc.bytes - Bytes to decoratebytes with magic prepended (Creates a new
byte array that is bytes.length plus ProtobufMagic.PB_MAGIC.length.public static boolean isPBMagicPrefix(byte[] bytes)
bytes - Bytes to check.bytes has ProtobufMagic.PB_MAGIC for a prefix.public static boolean isPBMagicPrefix(byte[] bytes,
int offset,
int len)
bytes - Bytes to check.offset - offset to start atlen - length to usebytes has ProtobufMagic.PB_MAGIC for a prefix.public static void expectPBMagicPrefix(byte[] bytes)
throws org.apache.hadoop.hbase.exceptions.DeserializationException
bytes - bytes to checkorg.apache.hadoop.hbase.exceptions.DeserializationException - if we are missing the pb magic prefixpublic static int lengthOfPBMagic()
ProtobufMagic.lengthOfPBMagic()public static org.apache.hadoop.hbase.shaded.protobuf.generated.ComparatorProtos.ByteArrayComparable toByteArrayComparable(byte[] value)
public static IOException getRemoteException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se)
se - ServiceException that wraps IO exception thrown by the serverpublic static IOException handleRemoteException(Exception e)
getRemoteException(ServiceException) but more generic, able to handle more than
just ServiceException. Prefer this method to
getRemoteException(ServiceException) because trying to
contain direct protobuf references.e - public static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName toServerName(org.apache.hadoop.hbase.ServerName serverName)
serverName - the ServerName to converttoServerName(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName)public static org.apache.hadoop.hbase.ServerName toServerName(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName proto)
proto - the protocol buffer ServerName to convertpublic static List<org.apache.hadoop.hbase.ServerName> toServerNameList(List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName> proto)
proto - protocol buffer ServerNameListpublic static List<org.apache.hadoop.hbase.NamespaceDescriptor> toNamespaceDescriptorList(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListNamespaceDescriptorsResponse proto)
proto - the ListNamespaceDescriptorsResponsepublic static List<TableDescriptor> toTableDescriptorList(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableDescriptorsResponse proto)
proto - the GetTableDescriptorsResponsepublic static List<TableDescriptor> toTableDescriptorList(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListTableDescriptorsByNamespaceResponse proto)
proto - the ListTableDescriptorsByNamespaceResponsepublic static byte[][] getSplitKeysArray(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.CreateTableRequest proto)
proto - the CreateTableRequestpublic static Durability toDurability(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Durability proto)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Durability toDurability(Durability d)
public static Get toGet(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Get proto) throws IOException
proto - the protocol buffer Get to convertIOExceptionpublic static Consistency toConsistency(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Consistency consistency)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Consistency toConsistency(Consistency consistency)
public static Put toPut(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto) throws IOException
proto - The protocol buffer MutationProto to convertIOExceptionpublic static Put toPut(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto, org.apache.hadoop.hbase.CellScanner cellScanner) throws IOException
proto - The protocol buffer MutationProto to convertcellScanner - If non-null, the Cell data that goes with this proto.IOExceptionpublic static Delete toDelete(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto) throws IOException
proto - the protocol buffer Mutate to convertIOExceptionpublic static Delete toDelete(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto, org.apache.hadoop.hbase.CellScanner cellScanner) throws IOException
proto - the protocol buffer Mutate to convertcellScanner - if non-null, the data that goes with this delete.IOExceptionpublic static Append toAppend(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto, org.apache.hadoop.hbase.CellScanner cellScanner) throws IOException
cellScanner - proto - the protocol buffer Mutate to convertIOExceptionpublic static Increment toIncrement(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto, org.apache.hadoop.hbase.CellScanner cellScanner) throws IOException
proto - the protocol buffer Mutate to convertIOExceptionpublic static Mutation toMutation(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto) throws IOException
proto - the protocol buffer Mutate to convertIOExceptionpublic static Get toGet(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto proto, org.apache.hadoop.hbase.CellScanner cellScanner) throws IOException
proto - the protocol buffer Mutate to convert.cellScanner - IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Scan.ReadType toReadType(Scan.ReadType readType)
public static Scan.ReadType toReadType(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Scan.ReadType readType)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Scan toScan(Scan scan) throws IOException
scan - the client Scan to convertIOExceptionpublic static Scan toScan(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Scan proto) throws IOException
proto - the protocol buffer Scan to convertIOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Cursor toCursor(Cursor cursor)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Cursor toCursor(org.apache.hadoop.hbase.Cell cell)
public static Cursor toCursor(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Cursor cursor)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Get toGet(Get get) throws IOException
get - the client GetIOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto toMutation(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation)
throws IOException
IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto toMutation(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation,
long nonce)
throws IOException
type - mutation - IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto toMutation(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Builder builder)
throws IOException
IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto toMutation(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Builder builder,
long nonce)
throws IOException
IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto toMutationNoData(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Builder builder)
throws IOException
type - mutation - builder - IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto toMutationNoData(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation)
throws IOException
type - mutation - IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto toMutationNoData(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.MutationType type,
Mutation mutation,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.Builder builder,
long nonce)
throws IOException
IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Result toResult(Result result)
result - the client Result to convertpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Result toResult(boolean existence,
boolean stale)
existence - the client existence to sendpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Result toResultNoData(Result result)
result - the client Result to convertpublic static Result toResult(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Result proto)
proto - the protocol buffer Result to convertpublic static Result toResult(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Result proto, org.apache.hadoop.hbase.CellScanner scanner) throws IOException
proto - the protocol buffer Result to convertscanner - Optional cell scanner.IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ComparatorProtos.Comparator toComparator(org.apache.hadoop.hbase.filter.ByteArrayComparable comparator)
comparator - the ByteArrayComparable to convertpublic static org.apache.hadoop.hbase.filter.ByteArrayComparable toComparator(org.apache.hadoop.hbase.shaded.protobuf.generated.ComparatorProtos.Comparator proto)
throws IOException
proto - the protocol buffer Comparator to convertIOExceptionpublic static Filter toFilter(org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos.Filter proto) throws IOException
proto - the protocol buffer Filter to convertIOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos.Filter toFilter(Filter filter) throws IOException
filter - the Filter to convertIOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.DeleteType toDeleteType(org.apache.hadoop.hbase.KeyValue.Type type)
throws IOException
type - IOExceptionpublic static org.apache.hadoop.hbase.KeyValue.Type fromDeleteType(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutationProto.DeleteType type)
throws IOException
type - The DeleteTypeIOExceptionpublic static Throwable toException(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameBytesPair parameter) throws IOException
parameter - the protocol buffer Parameter to convertIOException - if failed to deserialize the parameterpublic static <T extends org.apache.hbase.thirdparty.com.google.protobuf.Service> T newServiceStub(Class<T> service, org.apache.hbase.thirdparty.com.google.protobuf.RpcChannel channel) throws Exception
Exceptionpublic static RegionInfo getRegionInfo(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin, byte[] regionName) throws IOException
admin - regionName - IOExceptionpublic static List<RegionLoad> getRegionLoadInfo(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionLoadResponse regionLoadResponse)
public static void closeRegion(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
org.apache.hadoop.hbase.ServerName server,
byte[] regionName)
throws IOException
admin - regionName - IOExceptionpublic static void warmupRegion(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
RegionInfo regionInfo)
throws IOException
admin - regionInfo - IOExceptionpublic static void openRegion(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
org.apache.hadoop.hbase.ServerName server,
RegionInfo region)
throws IOException
admin - region - IOExceptionpublic static List<RegionInfo> getOnlineRegions(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin) throws IOException
admin - IOExceptionpublic static List<RegionInfo> getOnlineRegions(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin) throws IOException
IOExceptionpublic static List<RegionInfo> getRegionInfos(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionResponse proto)
proto - the GetOnlineRegionResponseproto is nullpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ServerInfo getServerInfo(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin)
throws IOException
IOExceptionpublic static List<String> getStoreFiles(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin, byte[] regionName, byte[] family) throws IOException
IOExceptionpublic static List<String> getStoreFiles(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin, byte[] regionName, byte[] family) throws IOException
IOExceptionpublic static long getTotalRequestsCount(org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionLoad rl)
public static byte[] toDelimitedByteArray(org.apache.hbase.thirdparty.com.google.protobuf.Message m)
throws IOException
m - Message to get delimited pb serialization of (with pb magic prefix)IOExceptionpublic static String getRegionEncodedName(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionSpecifier regionSpecifier) throws DoNotRetryIOException
regionSpecifier - the region specifierDoNotRetryIOException - if the specifier type is unsupportedpublic static ScanMetrics toScanMetrics(byte[] bytes)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.MapReduceProtos.ScanMetrics toScanMetrics(ScanMetrics scanMetrics, boolean reset)
public static void toIOException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se)
throws IOException
se - the ServiceException instance to convert into an IOExceptionIOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.CellProtos.Cell toCell(org.apache.hadoop.hbase.Cell kv)
public static org.apache.hadoop.hbase.Cell toCell(org.apache.hadoop.hbase.ExtendedCellBuilder cellBuilder,
org.apache.hadoop.hbase.shaded.protobuf.generated.CellProtos.Cell cell)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NamespaceDescriptor toProtoNamespaceDescriptor(org.apache.hadoop.hbase.NamespaceDescriptor ns)
public static org.apache.hadoop.hbase.NamespaceDescriptor toNamespaceDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NamespaceDescriptor desc)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.CompactionDescriptor toCompactionDescriptor(RegionInfo info, byte[] family, List<org.apache.hadoop.fs.Path> inputPaths, List<org.apache.hadoop.fs.Path> outputPaths, org.apache.hadoop.fs.Path storeDir)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.CompactionDescriptor toCompactionDescriptor(RegionInfo info, byte[] regionName, byte[] family, List<org.apache.hadoop.fs.Path> inputPaths, List<org.apache.hadoop.fs.Path> outputPaths, org.apache.hadoop.fs.Path storeDir)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.FlushDescriptor toFlushDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.FlushDescriptor.FlushAction action,
RegionInfo hri,
long flushSeqId,
Map<byte[],List<org.apache.hadoop.fs.Path>> committedFiles)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.RegionEventDescriptor toRegionEventDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.RegionEventDescriptor.EventType eventType,
RegionInfo hri,
long seqId,
org.apache.hadoop.hbase.ServerName server,
Map<byte[],List<org.apache.hadoop.fs.Path>> storeFiles)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.RegionEventDescriptor toRegionEventDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.RegionEventDescriptor.EventType eventType,
byte[] tableNameAsBytes,
byte[] encodedNameAsBytes,
byte[] regionNameAsBytes,
long seqId,
org.apache.hadoop.hbase.ServerName server,
Map<byte[],List<org.apache.hadoop.fs.Path>> storeFiles)
public static String getShortTextFormat(org.apache.hbase.thirdparty.com.google.protobuf.Message m)
m - mpublic static org.apache.hadoop.hbase.TableName toTableName(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableName tableNamePB)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableName toProtoTableName(org.apache.hadoop.hbase.TableName tableName)
public static List<org.apache.hadoop.hbase.TableName> toTableNameList(List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableName> tableNamesList)
public static org.apache.hadoop.hbase.TableName[] getTableNameArray(List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableName> tableNamesList)
public static CellVisibility toCellVisibility(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CellVisibility proto)
proto - public static CellVisibility toCellVisibility(byte[] protoBytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
protoBytes - org.apache.hadoop.hbase.exceptions.DeserializationExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CellVisibility toCellVisibility(CellVisibility cellVisibility)
cellVisibility - public static Authorizations toAuthorizations(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Authorizations proto)
proto - public static Authorizations toAuthorizations(byte[] protoBytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
protoBytes - org.apache.hadoop.hbase.exceptions.DeserializationExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Authorizations toAuthorizations(Authorizations authorizations)
authorizations - public static TimeUnit toTimeUnit(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TimeUnit proto)
proto - public static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TimeUnit toProtoTimeUnit(TimeUnit timeUnit)
timeUnit - public static ThrottleType toThrottleType(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleType proto)
proto - public static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleType toProtoThrottleType(ThrottleType type)
type - public static QuotaScope toQuotaScope(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.QuotaScope proto)
proto - public static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.QuotaScope toProtoQuotaScope(QuotaScope scope)
scope - public static QuotaType toQuotaScope(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.QuotaType proto)
proto - public static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.QuotaType toProtoQuotaScope(QuotaType type)
type - public static SpaceViolationPolicy toViolationPolicy(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceViolationPolicy proto)
proto - The protocol buffer space violation policy.public static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceViolationPolicy toProtoViolationPolicy(SpaceViolationPolicy policy)
policy - The client SpaceViolationPolicy object.public static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.TimedQuota toTimedQuota(long limit,
TimeUnit timeUnit,
QuotaScope scope)
limit - the allowed number of request/data per timeUnittimeUnit - the limit time unitscope - the quota scopepublic static org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota toProtoSpaceQuota(long limit,
SpaceViolationPolicy violationPolicy)
limit - The maximum space usage for the quota in bytes.violationPolicy - The policy to apply when the quota is violated.public static org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.BulkLoadDescriptor toBulkLoadDescriptor(org.apache.hadoop.hbase.TableName tableName,
org.apache.hbase.thirdparty.com.google.protobuf.ByteString encodedRegionName,
Map<byte[],List<org.apache.hadoop.fs.Path>> storeFiles,
Map<String,Long> storeFilesSize,
long bulkloadSeqId)
tableName - The tableName into which the bulk load is being imported into.encodedRegionName - Encoded region name of the region which is being bulk loaded.storeFiles - A set of store files of a column family are bulk loaded.storeFilesSize - Map of store files and their lengthsbulkloadSeqId - sequence ID (by a force flush) used to create bulk load hfile
namepublic static void mergeDelimitedFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
InputStream in)
throws IOException
builder - current message builderin - Inputsream with delimited protobuf dataIOExceptionpublic static void mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
InputStream in,
int size)
throws IOException
builder - current message builderin - InputStream containing protobuf datasize - known size of protobuf dataIOExceptionpublic static void mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
InputStream in)
throws IOException
builder - current message builderin - InputStream containing protobuf dataIOExceptionpublic static void mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
org.apache.hbase.thirdparty.com.google.protobuf.ByteString bs)
throws IOException
builder - current message builderbs - ByteString containing theIOExceptionpublic static void mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
byte[] b)
throws IOException
builder - current message builderb - byte arrayIOExceptionpublic static void mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
byte[] b,
int offset,
int length)
throws IOException
builder - current message builderb - byte arrayoffset - length - IOExceptionpublic static void mergeFrom(org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder builder,
org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream codedInput,
int length)
throws IOException
IOExceptionpublic static ReplicationLoadSink toReplicationLoadSink(org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ReplicationLoadSink rls)
public static ReplicationLoadSource toReplicationLoadSource(org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ReplicationLoadSource rls)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo getVersionInfo()
public static List<SecurityCapability> toSecurityCapabilityList(List<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SecurityCapabilitiesResponse.Capability> capabilities)
capabilities - capabilities returned in the SecurityCapabilitiesResponse messagepublic static org.apache.hadoop.hbase.io.TimeRange toTimeRange(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TimeRange timeRange)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ColumnFamilySchema toColumnFamilySchema(ColumnFamilyDescriptor hcd)
hcd - the ColumnFamilySchemapublic static ColumnFamilyDescriptor toColumnFamilyDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ColumnFamilySchema cfs)
cfs - the ColumnFamilySchemaColumnFamilyDescriptor made from the passed in cfspublic static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableSchema toTableSchema(TableDescriptor htd)
htd - the TableDescriptorTableDescriptor into a pb TableSchema instance.public static TableDescriptor toTableDescriptor(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TableSchema ts)
ts - A pb TableSchema instance.TableDescriptor made from the passed in pb ts.public static CompactionState createCompactionState(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState state)
CompactionState from
AdminProtos.GetRegionInfoResponse.CompactionState
statestate - the protobuf CompactionStatepublic static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState createCompactionState(CompactionState state)
public static Optional<Long> toOptionalTimestamp(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MajorCompactionTimestampResponse resp)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type createProtosSnapShotDescType(SnapshotType type)
HBaseProtos.SnapshotDescription.Type
from SnapshotTypetype - the SnapshotDescription typepublic static org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type createProtosSnapShotDescType(String snapshotDesc)
HBaseProtos.SnapshotDescription.Type
from the type of SnapshotDescription stringsnapshotDesc - string representing the snapshot description typepublic static SnapshotType createSnapshotType(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type type)
SnapshotType from the type of
HBaseProtos.SnapshotDescriptiontype - the snapshot description typepublic static org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription createHBaseProtosSnapshotDesc(SnapshotDescription snapshotDesc)
SnapshotDescription to
HBaseProtos.SnapshotDescriptionsnapshotDesc - the POJO SnapshotDescriptionpublic static SnapshotDescription createSnapshotDesc(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshotDesc)
HBaseProtos.SnapshotDescription to
SnapshotDescriptionsnapshotDesc - the protobuf SnapshotDescriptionpublic static RegionLoadStats createRegionLoadStats(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.RegionLoadStats stats)
public static String toText(org.apache.hbase.thirdparty.com.google.protobuf.Message msg)
msg - msgpublic static byte[] toBytes(org.apache.hbase.thirdparty.com.google.protobuf.ByteString bs)
public static <T> T call(Callable<T> callable) throws IOException
IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetStoreFileRequest buildGetStoreFileRequest(byte[] regionName,
byte[] family)
regionName - the name of the region to get infofamily - the family to get store file listpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CloseRegionRequest buildCloseRegionRequest(org.apache.hadoop.hbase.ServerName server,
byte[] regionName)
regionName - the name of the region to closepublic static org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CloseRegionRequest buildCloseRegionRequest(org.apache.hadoop.hbase.ServerName server,
byte[] regionName,
org.apache.hadoop.hbase.ServerName destinationServer)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription buildProcedureDescription(String signature, String instance, Map<String,String> props)
public static org.apache.hadoop.hbase.ServerName parseServerNameFrom(byte[] data)
throws org.apache.hadoop.hbase.exceptions.DeserializationException
data - Data with a serialize server name in it; can handle the old style
servername where servername was host and port. Works too with data that
begins w/ the pb 'PBUF' magic and that is then followed by a protobuf that
has a serialized ServerName in it.data is null else converts passed data
to a ServerName instance.org.apache.hadoop.hbase.exceptions.DeserializationExceptionpublic static String toProcedureJson(List<org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure> procProtos)
public static String toLockJson(List<org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockedResource> lockedResourceProtos)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionInfo toRegionInfo(RegionInfo info)
info - the RegionInfo to convertpublic static RegionInfo toRegionInfo(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionInfo proto)
proto - the RegionInfo to convertpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionLocation toRegionLocation(HRegionLocation loc)
public static HRegionLocation toRegionLocation(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionLocation proto)
public static List<SnapshotDescription> toSnapshotDescriptionList(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetCompletedSnapshotsResponse response, Pattern pattern)
public static CacheEvictionStats toCacheEvictionStats(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.CacheEvictionStats stats) throws IOException
IOExceptionpublic static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.CacheEvictionStats toCacheEvictionStats(CacheEvictionStats cacheEvictionStats)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ReplicationLoadSource toReplicationLoadSource(ReplicationLoadSource rls)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ReplicationLoadSink toReplicationLoadSink(ReplicationLoadSink rls)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.TimeRange toTimeRange(org.apache.hadoop.hbase.io.TimeRange timeRange)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.