本文整理汇总了Java中org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Authorizations方法的典型用法代码示例。如果您正苦于以下问题:Java ClientProtos.Authorizations方法的具体用法?Java ClientProtos.Authorizations怎么用?Java ClientProtos.Authorizations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.protobuf.generated.ClientProtos
的用法示例。
在下文中一共展示了ClientProtos.Authorizations方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toAuthorizations
import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; //导入方法依赖的package包/类
/**
* Convert a protocol buffer Authorizations bytes to a client Authorizations
*
* @param protoBytes
* @return the converted client Authorizations
* @throws DeserializationException
*/
public static Authorizations toAuthorizations(byte[] protoBytes) throws DeserializationException {
if (protoBytes == null) return null;
ClientProtos.Authorizations.Builder builder = ClientProtos.Authorizations.newBuilder();
ClientProtos.Authorizations proto = null;
try {
ProtobufUtil.mergeFrom(builder, protoBytes);
proto = builder.build();
} catch (IOException e) {
throw new DeserializationException(e);
}
return toAuthorizations(proto);
}
示例2: toAuthorizations
import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; //导入方法依赖的package包/类
/**
* Convert a protocol buffer Authorizations bytes to a client Authorizations
*
* @param protoBytes
* @return the converted client Authorizations
* @throws DeserializationException
*/
public static Authorizations toAuthorizations(byte[] protoBytes) throws DeserializationException {
if (protoBytes == null) return null;
ClientProtos.Authorizations.Builder builder = ClientProtos.Authorizations.newBuilder();
ClientProtos.Authorizations proto = null;
try {
proto = builder.mergeFrom(protoBytes).build();
} catch (InvalidProtocolBufferException e) {
throw new DeserializationException(e);
}
return toAuthorizations(proto);
}