天天看點

spark學習-74-源代碼:Endpoint模型介紹(6)-Endpoint的消息的接收Endpoint receive流程

spark學習-74-源代碼:Endpoint模型介紹(6)-Endpoint的消息的接收Endpoint receive流程

Endpoint receive流程

Endpoint的消息的接收,流程如下:

spark學習-74-源代碼:Endpoint模型介紹(6)-Endpoint的消息的接收Endpoint receive流程

本圖主要包括兩部分,一部分是建立Netty服務

一部分是接收消息

建立Netty服務

這裡有個小問題,因為我找不到RpcEndpoint new NettyRpcEnv,導緻我兩天沒找到第一個new

1. 下面以master講解,先看看main方法

def main(argStrings: Array[String]) {
    //實用的功能主要是設定一些平常的診斷狀态,,應該在main方法之前調用
    Utils.initDaemon(log)
    val conf = new SparkConf
    val args = new MasterArguments(argStrings, conf)
    val (rpcEnv, _, _) = startRpcEnvAndEnd
           

繼續閱讀