|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.protobuf.ProtobufUtil
public final class ProtobufUtil
Protobufs utility.
Field Summary | |
---|---|
static byte[] |
PB_MAGIC
Magic we put ahead of a serialized protobuf message. |
Method Summary | ||
---|---|---|
static boolean |
bulkLoadHFile(ClientProtos.ClientService.BlockingInterface client,
List<Pair<byte[],String>> familyPaths,
byte[] regionName,
boolean assignSeqNum)
A helper to bulk load a list of HFiles using client protocol. |
|
static void |
closeRegion(AdminProtos.AdminService.BlockingInterface admin,
byte[] regionName,
boolean transitionInZK)
A helper to close a region given a region name using admin protocol. |
|
static boolean |
closeRegion(AdminProtos.AdminService.BlockingInterface admin,
byte[] regionName,
int versionOfClosingNode,
ServerName destinationServer,
boolean transitionInZK)
A helper to close a region given a region name using admin protocol. |
|
static ClientProtos.CoprocessorServiceResponse |
execService(ClientProtos.ClientService.BlockingInterface client,
ClientProtos.CoprocessorServiceCall call,
byte[] regionName)
|
|
static ClientProtos.CoprocessorServiceResponse |
execService(MasterProtos.MasterService.BlockingInterface client,
ClientProtos.CoprocessorServiceCall call)
|
|
static void |
expectPBMagicPrefix(byte[] bytes)
|
|
static Result |
get(ClientProtos.ClientService.BlockingInterface client,
byte[] regionName,
Get get)
A helper to invoke a Get using client protocol. |
|
static HTableDescriptor[] |
getHTableDescriptorArray(MasterProtos.GetTableDescriptorsResponse proto)
Get HTableDescriptor[] from GetTableDescriptorsResponse protobuf |
|
static List<HRegionInfo> |
getOnlineRegions(AdminProtos.AdminService.BlockingInterface admin)
A helper to get the all the online regions on a region server using admin protocol. |
|
static
|
getParsedGenericInstance(Class<?> runtimeClass,
int position,
com.google.protobuf.ByteString b)
Get an instance of the argument type declared in a class's signature. |
|
static String |
getRegionEncodedName(HBaseProtos.RegionSpecifier regionSpecifier)
Find the HRegion encoded name based on a region specifier |
|
static HRegionInfo |
getRegionInfo(AdminProtos.AdminService.BlockingInterface admin,
byte[] regionName)
A helper to retrieve region info given a region name using admin protocol. |
|
static IOException |
getRemoteException(com.google.protobuf.ServiceException se)
Return the IOException thrown by the remote server wrapped in ServiceException as cause. |
|
static Result |
getRowOrBefore(ClientProtos.ClientService.BlockingInterface client,
byte[] regionName,
byte[] row,
byte[] family)
A helper to get a row of the closet one before using client protocol. |
|
static AdminProtos.ServerInfo |
getServerInfo(AdminProtos.AdminService.BlockingInterface admin)
A helper to get the info of a region server using admin protocol. |
|
static String |
getShortTextFormat(com.google.protobuf.Message m)
Return short version of Message toString'd, shorter than TextFormat#shortDebugString. |
|
static byte[][] |
getSplitKeysArray(MasterProtos.CreateTableRequest proto)
get the split keys in form "byte [][]" from a CreateTableRequest proto |
|
static List<String> |
getStoreFiles(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 TableName[] |
getTableNameArray(List<HBaseProtos.TableName> tableNamesList)
|
|
static long |
getTotalRequestsCount(ClusterStatusProtos.RegionLoad rl)
|
|
static List<UserPermission> |
getUserPermissions(AccessControlProtos.AccessControlService.BlockingInterface protocol)
A utility used to get user's global permissions. |
|
static List<UserPermission> |
getUserPermissions(AccessControlProtos.AccessControlService.BlockingInterface protocol,
TableName t)
A utility used to get user table permissions. |
|
static void |
grant(AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
Permission.Action... actions)
A utility used to grant a user global permissions. |
|
static void |
grant(AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
String namespace,
Permission.Action... actions)
A utility used to grant a user namespace permissions. |
|
static void |
grant(AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
TableName tableName,
byte[] f,
byte[] q,
Permission.Action... actions)
A utility used to grant a user table permissions. |
|
static boolean |
isPBMagicPrefix(byte[] bytes)
|
|
static int |
lengthOfPBMagic()
|
|
static void |
mergeRegions(AdminProtos.AdminService.BlockingInterface admin,
HRegionInfo region_a,
HRegionInfo region_b,
boolean forcible)
A helper to merge regions using admin protocol. |
|
static
|
newServiceStub(Class<T> service,
com.google.protobuf.RpcChannel channel)
|
|
static void |
openRegion(AdminProtos.AdminService.BlockingInterface admin,
HRegionInfo region)
A helper to open a region using admin protocol. |
|
static byte[] |
prependPBMagic(byte[] bytes)
Prepend the passed bytes with four bytes of magic, PB_MAGIC , to flag what
follows as a protobuf in hbase. |
|
static void |
revoke(AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
Permission.Action... actions)
A utility used to revoke a user's global permissions. |
|
static void |
revoke(AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
String namespace,
Permission.Action... actions)
A utility used to revoke a user's namespace permissions. |
|
static void |
revoke(AccessControlProtos.AccessControlService.BlockingInterface protocol,
String userShortName,
TableName tableName,
byte[] f,
byte[] q,
Permission.Action... actions)
A utility used to revoke a user's table permissions. |
|
static void |
split(AdminProtos.AdminService.BlockingInterface admin,
HRegionInfo hri,
byte[] splitPoint)
A helper to split a region using admin protocol. |
|
static Append |
toAppend(ClientProtos.MutationProto proto,
CellScanner cellScanner)
Convert a protocol buffer Mutate to an Append |
|
static CellProtos.Cell |
toCell(Cell kv)
|
|
static Cell |
toCell(CellProtos.Cell cell)
|
|
static WALProtos.CompactionDescriptor |
toCompactionDescriptor(HRegionInfo info,
byte[] family,
List<org.apache.hadoop.fs.Path> inputPaths,
List<org.apache.hadoop.fs.Path> outputPaths,
org.apache.hadoop.fs.Path storeDir)
|
|
static ComparatorProtos.Comparator |
toComparator(ByteArrayComparable comparator)
Convert a ByteArrayComparable to a protocol buffer Comparator |
|
static ByteArrayComparable |
toComparator(ComparatorProtos.Comparator proto)
Convert a protocol buffer Comparator to a ByteArrayComparable |
|
static Delete |
toDelete(ClientProtos.MutationProto proto)
Convert a protocol buffer Mutate to a Delete |
|
static Delete |
toDelete(ClientProtos.MutationProto proto,
CellScanner cellScanner)
Convert a protocol buffer Mutate to a Delete |
|
static ClientProtos.MutationProto.DeleteType |
toDeleteType(KeyValue.Type type)
Convert a delete KeyValue type to protocol buffer DeleteType. |
|
static byte[] |
toDelimitedByteArray(com.google.protobuf.Message m)
|
|
static Durability |
toDurability(ClientProtos.MutationProto.Durability proto)
Convert a protobuf Durability into a client Durability |
|
static ClientProtos.MutationProto.Durability |
toDurability(Durability d)
Convert a client Durability into a protbuf Durability |
|
static Throwable |
toException(HBaseProtos.NameBytesPair parameter)
Convert a stringified protocol buffer exception Parameter to a Java Exception |
|
static FilterProtos.Filter |
toFilter(Filter filter)
Convert a client Filter to a protocol buffer Filter |
|
static Filter |
toFilter(FilterProtos.Filter proto)
Convert a protocol buffer Filter to a client Filter |
|
static Get |
toGet(ClientProtos.Get proto)
Convert a protocol buffer Get to a client Get |
|
static ClientProtos.Get |
toGet(Get get)
Create a protocol buffer Get based on a client Get. |
|
static Increment |
toIncrement(ClientProtos.MutationProto proto,
CellScanner cellScanner)
Convert a protocol buffer Mutate to an Increment |
|
static void |
toIOException(com.google.protobuf.ServiceException se)
Unwraps an exception from a protobuf service into the underlying (expected) IOException. |
|
static ClientProtos.MutationProto |
toMutation(ClientProtos.MutationProto.MutationType type,
Mutation mutation)
Create a protocol buffer Mutate based on a client Mutation |
|
static Mutation |
toMutation(ClientProtos.MutationProto proto)
Convert a MutateRequest to Mutation |
|
static ClientProtos.MutationProto |
toMutation(Increment increment)
Convert a client Increment to a protobuf Mutate. |
|
static ClientProtos.MutationProto |
toMutationNoData(ClientProtos.MutationProto.MutationType type,
Mutation mutation)
Create a protocol buffer MutationProto based on a client Mutation. |
|
static NamespaceDescriptor |
toNamespaceDescriptor(HBaseProtos.NamespaceDescriptor desc)
|
|
static Permission |
toPermission(AccessControlProtos.Permission proto)
Converts a Permission proto to a client Permission object. |
|
static AccessControlProtos.Permission |
toPermission(Permission perm)
Convert a client Permission to a Permission proto |
|
static Permission.Action |
toPermissionAction(AccessControlProtos.Permission.Action action)
Converts a Permission.Action proto to a client Permission.Action object. |
|
static AccessControlProtos.Permission.Action |
toPermissionAction(Permission.Action action)
Convert a client Permission.Action to a Permission.Action proto |
|
static List<Permission.Action> |
toPermissionActions(List<AccessControlProtos.Permission.Action> protoActions)
Converts a list of Permission.Action proto to a list of client Permission.Action objects. |
|
static HBaseProtos.NamespaceDescriptor |
toProtoNamespaceDescriptor(NamespaceDescriptor ns)
|
|
static HBaseProtos.TableName |
toProtoTableName(TableName tableName)
|
|
static Put |
toPut(ClientProtos.MutationProto proto)
Convert a protocol buffer Mutate to a Put. |
|
static Put |
toPut(ClientProtos.MutationProto proto,
CellScanner cellScanner)
Convert a protocol buffer Mutate to a Put. |
|
static ClientProtos.Result |
toResult(boolean existence)
Convert a client Result to a protocol buffer Result |
|
static Result |
toResult(ClientProtos.Result proto)
Convert a protocol buffer Result to a client Result |
|
static Result |
toResult(ClientProtos.Result proto,
CellScanner scanner)
Convert a protocol buffer Result to a client Result |
|
static ClientProtos.Result |
toResult(Result result)
Convert a client Result to a protocol buffer Result |
|
static ClientProtos.Result |
toResultNoData(Result result)
Convert a client Result to a protocol buffer Result. |
|
static Scan |
toScan(ClientProtos.Scan proto)
Convert a protocol buffer Scan to a client Scan |
|
static ClientProtos.Scan |
toScan(Scan scan)
Convert a client Scan to a protocol buffer Scan |
|
static ScanMetrics |
toScanMetrics(byte[] bytes)
|
|
static MapReduceProtos.ScanMetrics |
toScanMetrics(ScanMetrics scanMetrics)
|
|
static ServerName |
toServerName(HBaseProtos.ServerName proto)
Convert a protocol buffer ServerName to a ServerName |
|
static HBaseProtos.ServerName |
toServerName(ServerName serverName)
Convert a ServerName to a protocol buffer ServerName |
|
static TableName |
toTableName(HBaseProtos.TableName tableNamePB)
|
|
static TablePermission |
toTablePermission(AccessControlProtos.Permission proto)
Converts a Permission proto to a client TablePermission object. |
|
static org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> |
toToken(AuthenticationProtos.Token proto)
Converts a protobuf Token message back into a Token instance. |
|
static AuthenticationProtos.Token |
toToken(org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> token)
Converts a Token instance (with embedded identifier) to the protobuf representation. |
|
static UserPermission |
toUserPermission(AccessControlProtos.UserPermission proto)
Converts a user permission proto to a client user permission object. |
|
static AccessControlProtos.UserPermission |
toUserPermission(UserPermission perm)
Convert a client user permission to a user permission proto |
|
static com.google.common.collect.ListMultimap<String,TablePermission> |
toUserTablePermissions(AccessControlProtos.UsersAndPermissions proto)
Convert a protobuf UserTablePermissions to a ListMultimap |
|
static AccessControlProtos.UsersAndPermissions |
toUserTablePermissions(com.google.common.collect.ListMultimap<String,TablePermission> perm)
Convert a ListMultimap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte[] PB_MAGIC
Method Detail |
---|
public static byte[] prependPBMagic(byte[] bytes)
PB_MAGIC
, to flag what
follows as a protobuf in hbase. Prepend these bytes to all content written to znodes, etc.
bytes
- Bytes to decorate
bytes with magic prepended (Creates a new
byte array that is bytes.length
plus PB_MAGIC
.length.
public static boolean isPBMagicPrefix(byte[] bytes)
bytes
- Bytes to check.
bytes
has PB_MAGIC
for a prefix.public static void expectPBMagicPrefix(byte[] bytes) throws DeserializationException
bytes
-
DeserializationException
- if we are missing the pb magic prefixpublic static int lengthOfPBMagic()
PB_MAGIC
public static IOException getRemoteException(com.google.protobuf.ServiceException se)
se
- ServiceException that wraps IO exception thrown by the server
public static HBaseProtos.ServerName toServerName(ServerName serverName)
serverName
- the ServerName to convert
toServerName(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ServerName)
public static ServerName toServerName(HBaseProtos.ServerName proto)
proto
- the protocol buffer ServerName to convert
public static HTableDescriptor[] getHTableDescriptorArray(MasterProtos.GetTableDescriptorsResponse proto)
proto
- the GetTableDescriptorsResponse
public static byte[][] getSplitKeysArray(MasterProtos.CreateTableRequest proto)
proto
- the CreateTableRequest
public static Durability toDurability(ClientProtos.MutationProto.Durability proto)
public static ClientProtos.MutationProto.Durability toDurability(Durability d)
public static Get toGet(ClientProtos.Get proto) throws IOException
proto
- the protocol buffer Get to convert
IOException
public static Put toPut(ClientProtos.MutationProto proto) throws IOException
proto
- The protocol buffer MutationProto to convert
IOException
public static Put toPut(ClientProtos.MutationProto proto, CellScanner cellScanner) throws IOException
proto
- The protocol buffer MutationProto to convertcellScanner
- If non-null, the Cell data that goes with this proto.
IOException
public static Delete toDelete(ClientProtos.MutationProto proto) throws IOException
proto
- the protocol buffer Mutate to convert
IOException
public static Delete toDelete(ClientProtos.MutationProto proto, CellScanner cellScanner) throws IOException
proto
- the protocol buffer Mutate to convertcellScanner
- if non-null, the data that goes with this delete.
IOException
public static Append toAppend(ClientProtos.MutationProto proto, CellScanner cellScanner) throws IOException
cellScanner
- proto
- the protocol buffer Mutate to convert
IOException
public static Mutation toMutation(ClientProtos.MutationProto proto) throws IOException
proto
- the protocol buffer Mutate to convert
IOException
public static Increment toIncrement(ClientProtos.MutationProto proto, CellScanner cellScanner) throws IOException
proto
- the protocol buffer Mutate to convert
IOException
public static ClientProtos.Scan toScan(Scan scan) throws IOException
scan
- the client Scan to convert
IOException
public static Scan toScan(ClientProtos.Scan proto) throws IOException
proto
- the protocol buffer Scan to convert
IOException
public static ClientProtos.Get toGet(Get get) throws IOException
get
- the client Get
IOException
public static ClientProtos.MutationProto toMutation(Increment increment)
increment
-
public static ClientProtos.MutationProto toMutation(ClientProtos.MutationProto.MutationType type, Mutation mutation) throws IOException
type
- mutation
-
IOException
public static ClientProtos.MutationProto toMutationNoData(ClientProtos.MutationProto.MutationType type, Mutation mutation) throws IOException
type
- mutation
-
IOException
public static ClientProtos.Result toResult(Result result)
result
- the client Result to convert
public static ClientProtos.Result toResult(boolean existence)
existence
- the client existence to send
public static ClientProtos.Result toResultNoData(Result result)
result
- the client Result to convert
public static Result toResult(ClientProtos.Result proto)
proto
- the protocol buffer Result to convert
public static Result toResult(ClientProtos.Result proto, CellScanner scanner) throws IOException
proto
- the protocol buffer Result to convertscanner
- Optional cell scanner.
IOException
public static ComparatorProtos.Comparator toComparator(ByteArrayComparable comparator)
comparator
- the ByteArrayComparable to convert
public static ByteArrayComparable toComparator(ComparatorProtos.Comparator proto) throws IOException
proto
- the protocol buffer Comparator to convert
IOException
public static Filter toFilter(FilterProtos.Filter proto) throws IOException
proto
- the protocol buffer Filter to convert
IOException
public static FilterProtos.Filter toFilter(Filter filter) throws IOException
filter
- the Filter to convert
IOException
public static ClientProtos.MutationProto.DeleteType toDeleteType(KeyValue.Type type) throws IOException
type
-
IOException
public static Throwable toException(HBaseProtos.NameBytesPair parameter) throws IOException
parameter
- the protocol buffer Parameter to convert
IOException
- if failed to deserialize the parameterpublic static Result get(ClientProtos.ClientService.BlockingInterface client, byte[] regionName, Get get) throws IOException
client
- regionName
- get
-
IOException
public static Result getRowOrBefore(ClientProtos.ClientService.BlockingInterface client, byte[] regionName, byte[] row, byte[] family) throws IOException
client
- regionName
- row
- family
-
IOException
public static boolean bulkLoadHFile(ClientProtos.ClientService.BlockingInterface client, List<Pair<byte[],String>> familyPaths, byte[] regionName, boolean assignSeqNum) throws IOException
client
- familyPaths
- regionName
- assignSeqNum
-
IOException
public static ClientProtos.CoprocessorServiceResponse execService(ClientProtos.ClientService.BlockingInterface client, ClientProtos.CoprocessorServiceCall call, byte[] regionName) throws IOException
IOException
public static ClientProtos.CoprocessorServiceResponse execService(MasterProtos.MasterService.BlockingInterface client, ClientProtos.CoprocessorServiceCall call) throws IOException
IOException
public static <T extends com.google.protobuf.Service> T newServiceStub(Class<T> service, com.google.protobuf.RpcChannel channel) throws Exception
Exception
public static HRegionInfo getRegionInfo(AdminProtos.AdminService.BlockingInterface admin, byte[] regionName) throws IOException
admin
- regionName
-
IOException
public static void closeRegion(AdminProtos.AdminService.BlockingInterface admin, byte[] regionName, boolean transitionInZK) throws IOException
admin
- regionName
- transitionInZK
-
IOException
public static boolean closeRegion(AdminProtos.AdminService.BlockingInterface admin, byte[] regionName, int versionOfClosingNode, ServerName destinationServer, boolean transitionInZK) throws IOException
admin
- regionName
- versionOfClosingNode
-
IOException
public static void openRegion(AdminProtos.AdminService.BlockingInterface admin, HRegionInfo region) throws IOException
admin
- region
-
IOException
public static List<HRegionInfo> getOnlineRegions(AdminProtos.AdminService.BlockingInterface admin) throws IOException
admin
-
IOException
public static AdminProtos.ServerInfo getServerInfo(AdminProtos.AdminService.BlockingInterface admin) throws IOException
admin
-
IOException
public static List<String> getStoreFiles(AdminProtos.AdminService.BlockingInterface admin, byte[] regionName, byte[] family) throws IOException
admin
- regionName
- family
-
IOException
public static void split(AdminProtos.AdminService.BlockingInterface admin, HRegionInfo hri, byte[] splitPoint) throws IOException
admin
- hri
- splitPoint
-
IOException
public static void mergeRegions(AdminProtos.AdminService.BlockingInterface admin, HRegionInfo region_a, HRegionInfo region_b, boolean forcible) throws IOException
admin
- region_a
- region_b
- forcible
- true if do a compulsory merge, otherwise we will only merge
two adjacent regions
IOException
public static long getTotalRequestsCount(ClusterStatusProtos.RegionLoad rl)
public static byte[] toDelimitedByteArray(com.google.protobuf.Message m) throws IOException
m
- Message to get delimited pb serialization of (with pb magic prefix)
IOException
public static Permission toPermission(AccessControlProtos.Permission proto)
proto
- the protobuf Permission
public static TablePermission toTablePermission(AccessControlProtos.Permission proto)
proto
- the protobuf Permission
public static AccessControlProtos.Permission toPermission(Permission perm)
perm
- the client Permission
public static List<Permission.Action> toPermissionActions(List<AccessControlProtos.Permission.Action> protoActions)
protoActions
- the list of protobuf Actions
public static Permission.Action toPermissionAction(AccessControlProtos.Permission.Action action)
action
- the protobuf Action
public static AccessControlProtos.Permission.Action toPermissionAction(Permission.Action action)
action
- the client Action
public static AccessControlProtos.UserPermission toUserPermission(UserPermission perm)
perm
- the client UserPermission
public static UserPermission toUserPermission(AccessControlProtos.UserPermission proto)
proto
- the protobuf UserPermission
public static AccessControlProtos.UsersAndPermissions toUserTablePermissions(com.google.common.collect.ListMultimap<String,TablePermission> perm)
perm
- the list of user and table permissions
public static void grant(AccessControlProtos.AccessControlService.BlockingInterface protocol, String userShortName, Permission.Action... actions) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol
- the AccessControlService protocol proxyuserShortName
- the short name of the user to grant permissionsactions
- the permissions to be granted
com.google.protobuf.ServiceException
public static void grant(AccessControlProtos.AccessControlService.BlockingInterface protocol, String userShortName, TableName tableName, byte[] f, byte[] q, Permission.Action... actions) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol
- the AccessControlService protocol proxyuserShortName
- the short name of the user to grant permissionstableName
- optional table namef
- optional column familyq
- optional qualifieractions
- the permissions to be granted
com.google.protobuf.ServiceException
public static void grant(AccessControlProtos.AccessControlService.BlockingInterface protocol, String userShortName, String namespace, Permission.Action... actions) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol
- the AccessControlService protocol proxynamespace
- the short name of the user to grant permissionsactions
- the permissions to be granted
com.google.protobuf.ServiceException
public static void revoke(AccessControlProtos.AccessControlService.BlockingInterface protocol, String userShortName, Permission.Action... actions) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol
- the AccessControlService protocol proxyuserShortName
- the short name of the user to revoke permissionsactions
- the permissions to be revoked
com.google.protobuf.ServiceException
public static void revoke(AccessControlProtos.AccessControlService.BlockingInterface protocol, String userShortName, TableName tableName, byte[] f, byte[] q, Permission.Action... actions) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol
- the AccessControlService protocol proxyuserShortName
- the short name of the user to revoke permissionstableName
- optional table namef
- optional column familyq
- optional qualifieractions
- the permissions to be revoked
com.google.protobuf.ServiceException
public static void revoke(AccessControlProtos.AccessControlService.BlockingInterface protocol, String userShortName, String namespace, Permission.Action... actions) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol
- the AccessControlService protocol proxyuserShortName
- the short name of the user to revoke permissionsnamespace
- optional table nameactions
- the permissions to be revoked
com.google.protobuf.ServiceException
public static List<UserPermission> getUserPermissions(AccessControlProtos.AccessControlService.BlockingInterface protocol) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol
- the AccessControlService protocol proxy
com.google.protobuf.ServiceException
public static List<UserPermission> getUserPermissions(AccessControlProtos.AccessControlService.BlockingInterface protocol, TableName t) throws com.google.protobuf.ServiceException
It's also called by the shell, in case you want to find references.
protocol
- the AccessControlService protocol proxyt
- optional table name
com.google.protobuf.ServiceException
public static com.google.common.collect.ListMultimap<String,TablePermission> toUserTablePermissions(AccessControlProtos.UsersAndPermissions proto)
proto
- the protobuf UserPermission
public static AuthenticationProtos.Token toToken(org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> token)
token
- the Token instance to copy
public static org.apache.hadoop.security.token.Token<AuthenticationTokenIdentifier> toToken(AuthenticationProtos.Token proto)
proto
- the protobuf Token message
public static String getRegionEncodedName(HBaseProtos.RegionSpecifier regionSpecifier) throws DoNotRetryIOException
regionSpecifier
- the region specifier
DoNotRetryIOException
- if the specifier type is unsupportedpublic static ScanMetrics toScanMetrics(byte[] bytes)
public static MapReduceProtos.ScanMetrics toScanMetrics(ScanMetrics scanMetrics)
public static void toIOException(com.google.protobuf.ServiceException se) throws IOException
se
- the ServiceException
instance to convert into an IOException
IOException
public static CellProtos.Cell toCell(Cell kv)
public static Cell toCell(CellProtos.Cell cell)
public static HBaseProtos.NamespaceDescriptor toProtoNamespaceDescriptor(NamespaceDescriptor ns)
public static NamespaceDescriptor toNamespaceDescriptor(HBaseProtos.NamespaceDescriptor desc) throws IOException
IOException
public static <T extends com.google.protobuf.Message> T getParsedGenericInstance(Class<?> runtimeClass, int position, com.google.protobuf.ByteString b) throws IOException
runtimeClass
- the runtime type of the classposition
- the position of the argument in the class declarationb
- the ByteString which should be parsed to get the instance created
IOException
public static WALProtos.CompactionDescriptor toCompactionDescriptor(HRegionInfo 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 String getShortTextFormat(com.google.protobuf.Message m)
m
-
m
public static TableName toTableName(HBaseProtos.TableName tableNamePB)
public static HBaseProtos.TableName toProtoTableName(TableName tableName)
public static TableName[] getTableNameArray(List<HBaseProtos.TableName> tableNamesList)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |