org.apache.hadoop.util
Class ProtoUtil

java.lang.Object
  extended by org.apache.hadoop.util.ProtoUtil

public abstract class ProtoUtil
extends Object


Constructor Summary
ProtoUtil()
           
 
Method Summary
static RPC.RpcKind convert(RpcPayloadHeaderProtos.RpcKindProto kind)
           
static org.apache.hadoop.security.UserGroupInformation getUgi(IpcConnectionContextProtos.IpcConnectionContextProto context)
           
static org.apache.hadoop.security.UserGroupInformation getUgi(IpcConnectionContextProtos.UserInformationProto userInfo)
           
static IpcConnectionContextProtos.IpcConnectionContextProto makeIpcConnectionContext(String protocol, org.apache.hadoop.security.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 RpcPayloadHeaderProtos.RpcPayloadHeaderProto makeRpcPayloadHeader(RPC.RpcKind rpcKind, RpcPayloadHeaderProtos.RpcPayloadOperationProto operation, int callId)
           
static int readRawVarint32(DataInput in)
          Read a variable length integer in the same format that ProtoBufs encodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtoUtil

public ProtoUtil()
Method Detail

readRawVarint32

public static int readRawVarint32(DataInput in)
                           throws IOException
Read a variable length integer in the same format that ProtoBufs encodes.

Parameters:
in - the input stream to read from
Returns:
the integer
Throws:
IOException - if it is malformed or EOF.

makeIpcConnectionContext

public static IpcConnectionContextProtos.IpcConnectionContextProto makeIpcConnectionContext(String protocol,
                                                                                            org.apache.hadoop.security.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.


getUgi

public static org.apache.hadoop.security.UserGroupInformation getUgi(IpcConnectionContextProtos.IpcConnectionContextProto context)

getUgi

public static org.apache.hadoop.security.UserGroupInformation getUgi(IpcConnectionContextProtos.UserInformationProto userInfo)

convert

public static RPC.RpcKind convert(RpcPayloadHeaderProtos.RpcKindProto kind)

makeRpcPayloadHeader

public static RpcPayloadHeaderProtos.RpcPayloadHeaderProto makeRpcPayloadHeader(RPC.RpcKind rpcKind,
                                                                                RpcPayloadHeaderProtos.RpcPayloadOperationProto operation,
                                                                                int callId)


Copyright © 2012 Apache Software Foundation. All Rights Reserved.