Constructor and Description |
---|
ProtoUtil() |
Modifier and Type | Method and Description |
---|---|
static RPC.RpcKind |
convert(RpcHeaderProtos.RpcKindProto kind) |
static UserGroupInformation |
getUgi(IpcConnectionContextProtos.IpcConnectionContextProto context) |
static UserGroupInformation |
getUgi(IpcConnectionContextProtos.UserInformationProto userInfo) |
static IpcConnectionContextProtos.IpcConnectionContextProto |
makeIpcConnectionContext(String protocol,
UserGroupInformation ugi,
SaslRpcServer.AuthMethod authMethod)
This method creates the connection context using exactly the same logic
as the old connection context as was done for writable where
the effective and real users are set based on the auth method.
|
static RpcHeaderProtos.RpcRequestHeaderProto |
makeRpcRequestHeader(RPC.RpcKind rpcKind,
RpcHeaderProtos.RpcRequestHeaderProto.OperationProto operation,
int callId,
int retryCount,
byte[] uuid) |
static int |
readRawVarint32(DataInput in)
Read a variable length integer in the same format that ProtoBufs encodes.
|
public ProtoUtil()
public static int readRawVarint32(DataInput in) throws IOException
in
- the input stream to read fromIOException
- if it is malformed or EOF.public static IpcConnectionContextProtos.IpcConnectionContextProto makeIpcConnectionContext(String protocol, UserGroupInformation ugi, SaslRpcServer.AuthMethod authMethod)
public static UserGroupInformation getUgi(IpcConnectionContextProtos.IpcConnectionContextProto context)
public static UserGroupInformation getUgi(IpcConnectionContextProtos.UserInformationProto userInfo)
public static RPC.RpcKind convert(RpcHeaderProtos.RpcKindProto kind)
public static RpcHeaderProtos.RpcRequestHeaderProto makeRpcRequestHeader(RPC.RpcKind rpcKind, RpcHeaderProtos.RpcRequestHeaderProto.OperationProto operation, int callId, int retryCount, byte[] uuid)
Copyright © 2017 Apache Software Foundation. All Rights Reserved.