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

RpcEndpointRef

RpcEndpointRef — Reference to RPC Endpoint

RpcEndpointRef is a reference to a RpcEndpoint in a RpcEnv.

RpcEndpointRef is a serializable entity and so you can send it over a network or save it for later use (it can however be deserialized using the owning RpcEnv only).

A RpcEndpointRef has an address (a Spark URL), and a name.

You can send asynchronous one-way messages to the corresponding RpcEndpoint using send method.

You can send a semi-synchronous message, i.e. “subscribe” to be notified when a response arrives, using ask method. You can also block the current calling thread for a response using askWithRetry method.

  • spark.rpc.numRetries (default: 3) – the number of times to retry connection attempts.

  • spark.rpc.retry.wait (default: 3s) – the number of milliseconds to wait on each retry.

It also uses lookup timeouts.

send Method

Caution
FIXME

askWithRetry Method

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

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏