首页 > 其他 > 详细

Spark分析之Worker

时间:2014-07-06 12:54:07      阅读:377      评论:0      收藏:0      [点我收藏+]
override def preStart() {
    webUi = new WorkerWebUI(this, workDir, Some(webUiPort))
    webUi.bind()  //创建并绑定UI
    registerWithMaster()  //注册到Master
}

def tryRegisterAllMasters() {
    for (masterUrl <- masterUrls) {
    logInfo("Connecting to master " + masterUrl + "...")
    val actor = context.actorSelection(Master.toAkkaUrl(masterUrl))
    actor ! RegisterWorker(workerId, host, port, cores, memory, webUi.boundPort, publicAddress)
    }
}

Worker的主要功能:

1、向master注册

2、处理事件

RegisteredWorker/RegisterWorkerFailed
LaunchExecutor/ExecutorStateChanged/KillExecutor
LaunchDriver/KillDriver
WorkDirCleanup/MasterChanged/Heartbeat/DriverStateChanged/RequestWorkerState

Spark分析之Worker,布布扣,bubuko.com

Spark分析之Worker

原文:http://www.cnblogs.com/luogankun/p/3825930.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!