@Private
@Unstable
public final class ShadedProtobufHelper
extends java.lang.Object
org.apache.hadoop.thirdparty.protobuf shaded version.
This is absolutely private to hadoop-* modules.| Modifier and Type | Class | Description |
|---|---|---|
static interface |
ShadedProtobufHelper.IpcCall<T> |
| Modifier and Type | Method | Description |
|---|---|---|
static org.apache.hadoop.thirdparty.protobuf.ByteString |
getByteString(byte[] bytes) |
Get the byte string of a non-null byte array.
|
static org.apache.hadoop.thirdparty.protobuf.ByteString |
getFixedByteString(java.lang.String key) |
Get the ByteString for frequently used fixed and small set strings.
|
static org.apache.hadoop.thirdparty.protobuf.ByteString |
getFixedByteString(Text key) |
Get the ByteString for frequently used fixed and small set strings.
|
static java.io.IOException |
getRemoteException(org.apache.hadoop.thirdparty.protobuf.ServiceException se) |
Return the IOException thrown by the remote server wrapped in
ServiceException as cause.
|
static <T> T |
ipc(ShadedProtobufHelper.IpcCall<T> call) |
Evaluate a protobuf call, converting any ServiceException to an IOException.
|
static org.apache.hadoop.security.proto.SecurityProtos.TokenProto |
protoFromToken(Token<?> tok) |
Create a
TokenProto instance
from a hadoop token. |
static Token<? extends TokenIdentifier> |
tokenFromProto(org.apache.hadoop.security.proto.SecurityProtos.TokenProto tokenProto) |
Create a hadoop token from a protobuf token.
|
@Private @Unstable public static java.io.IOException getRemoteException(org.apache.hadoop.thirdparty.protobuf.ServiceException se)
se - ServiceException that wraps IO exception thrown by the serverpublic static org.apache.hadoop.thirdparty.protobuf.ByteString getFixedByteString(Text key)
key - Hadoop Writable Text stringpublic static org.apache.hadoop.thirdparty.protobuf.ByteString getFixedByteString(java.lang.String key)
key - stringpublic static org.apache.hadoop.thirdparty.protobuf.ByteString getByteString(byte[] bytes)
bytes - bytes to convert.public static Token<? extends TokenIdentifier> tokenFromProto(org.apache.hadoop.security.proto.SecurityProtos.TokenProto tokenProto)
tokenProto - tokenpublic static org.apache.hadoop.security.proto.SecurityProtos.TokenProto protoFromToken(Token<?> tok)
TokenProto instance
from a hadoop token.
This builds and caches the fields
(identifier, password, kind, service) but not
renewer or any payload.tok - tokenpublic static <T> T ipc(ShadedProtobufHelper.IpcCall<T> call) throws java.io.IOException
T - type of the resultcall - invocation to makejava.io.IOException - any translated protobuf exceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.