关注 spark技术分享,
撸spark源码 玩spark最佳实践

RpcEndpoint

RpcEndpoint

RpcEndpoint is a contract to define an RPC endpoint that can receive messages using callbacks, i.e. functions to execute when a message arrives.

RpcEndpoint lives in RpcEnv after being registered by a name.

A RpcEndpoint can be registered to one and only one RpcEnv.

The lifecycle of a RpcEndpoint is onStart, receive and onStop in sequence.

receive can be called concurrently.

Tip
If you want receive to be thread-safe, use ThreadSafeRpcEndpoint.

onError method is called for any exception thrown.

Table 1. RpcEndpoint Contract
Method Description

receive

Receives and processes a message

Note
RpcEndpoint is a private[spark] contract.

Activating RPC Endpoint (Just Before Handling Messages) — onStart Method

Caution
FIXME

stop Method

Caution
FIXME
赞(0) 打赏
未经允许不得转载:spark技术分享 » RpcEndpoint
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏