hadoop-rpc-1.0.0.1: Use the Hadoop RPC interface from Haskell.

Safe HaskellNone
LanguageHaskell2010

Data.Hadoop.Protobuf.Headers

Synopsis

Documentation

data UserInformation Source

User information beyond what can be determined as part of the security handshake at connection time (kerberos, tokens, etc)

data IpcConnectionContext Source

The connection context is sent as part of the connection establishment. It establishes the context for ALL Rpc calls within the connection.

Constructors

IpcConnectionContext 

Fields

ctxUserInfo :: Optional 2 (Message UserInformation)
 
ctxProtocol :: Optional 3 (Value Text)

Name of the next RPC layer.

data RpcKind Source

Determines the RPC Engine and the serialization of the RPC request.

Constructors

Builtin

Used for built-in calls by tests

Writable

Use WritableRpcEngine

ProtocolBuffer

Use ProtobufRpcEngine

data RpcOperation Source

Constructors

FinalPacket

The final RPC packet

ContinuationPacket

Not implemented yet

CloseConnection

Close the RPC connection

data RpcRequestHeader Source

Constructors

RpcRequestHeader 

Fields

reqKind :: Optional 1 (Enumeration RpcKind)
 
reqOp :: Optional 2 (Enumeration RpcOperation)
 
reqCallId :: Required 3 (Value (Signed Int32))

Sequence number that is sent back in response

reqClientId :: Required 4 (Value ByteString)

Globally unique client ID

reqRetryCount :: Optional 5 (Value (Signed Int32))

Retry count, 1 means this is the first retry

data RequestHeader Source

This message is the header for the Protobuf Rpc Engine when sending a RPC request from RPC client to the RPC server. The actual request (serialized as protobuf) follows this request.

No special header is needed for the Rpc Response for Protobuf Rpc Engine. The normal RPC response header (see RpcHeader.proto) are sufficient.

Constructors

RequestHeader 

Fields

reqMethodName :: Required 1 (Value Text)

Name of the RPC method

reqProtocolName :: Required 2 (Value Text)

RPCs for a particular interface (ie protocol) are done using an IPC connection that is setup using rpcProxy. The rpcProxy has a declared protocol name that is sent from client to server at connection time.

Each Rpc call also sends a protocol name (reqProtocolName). This name is usually the same as the connection protocol name, but not always. For example, meta protocols, such as ProtocolInfoProto, reuse the connection but need to indicate that the actual protocol is different (i.e. the protocol is ProtocolInfoProto) since they reuse the connection; in this case the protocol name is set to ProtocolInfoProto.

reqProtocolVersion :: Required 3 (Value Word64)

Protocol version of class declaring the called method.

data RpcStatus Source

Success or failure. The reponse header's error detail, exception class name and error message contains further details on the error.

Constructors

Success

Succeeded

Error

Non-fatal error, connection left open

Fatal

Fatal error, connection closed

data RpcResponseHeader Source

Note that RPC response header is also used when connection setup fails. (i.e. the response looks like an RPC response with a fake callId)

In case of Fatal error then the respose contains the Serverside's IPC version.

Constructors

RpcResponseHeader 

Fields

rspCallId :: Required 1 (Value Word32)

Call ID used in request

rspStatus :: Required 2 (Enumeration RpcStatus)
 
rspServerIpcVersion :: Optional 3 (Value Word32)

v7: Sent if fatal v9: Sent if success or fail

rspExceptionClassName :: Optional 4 (Value Text)

If the request fails

rspErrorMsg :: Optional 5 (Value Text)

If the request fails, often contains stack trace

rspErrorDetail :: Optional 6 (Enumeration Error)

In case of error

rspClientId :: Optional 7 (Value ByteString)

Globally unique client ID

rspRetryCount :: Optional 8 (Value Int32)
 

data Error Source

Describes why an RPC error occurred.

Constructors

ErrorApplication

RPC failed - RPC app threw exception

ErrorNoSuchMethod

RPC error - no such method

ErrorNoSuchProtocol

RPC error - no such protocol

ErrorRpcServer

RPC error on server side

ErrorSerializingResponse

Error serializing response

ErrorRpcVersionMismatch

RPC protocol version mismatch

ErrorCode Int

RPC error that we don't know about

FatalUnknown

Unknown fatal error

FatalUnsupportedSerialization

IPC layer serilization type invalid

FatalInvalidRpcHeader

Fields of RPC header are invalid

FatalDeserializingRequest

Could not deserialize RPC request

FatalVersionMismatch

IPC layer version mismatch

FatalUnauthorized

Auth failed

FatalCode Int

Fatal error that we don't know about

Instances