温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

AppClient如何注册Masters

发布时间:2022-01-14 16:26:31 来源:亿速云 阅读:138 作者:柒染 栏目:云计算

这篇文章的内容主要围绕AppClient如何注册Masters进行讲述,文章内容清晰易懂,条理清晰,非常适合新手学习,值得大家去阅读。感兴趣的朋友可以跟随小编一起阅读吧。希望大家通过这篇文章有所收获!

注册Master有两种,一种是registerWithMaster方法,一种是tryRegisterAllMasters方法,前者是单Master的情况,后者是多Master,一般情况下是满足HA机制,我们看一下registerWithMaster方法:

AppClient如何注册Masters

此时会调用tryRegisterAllMasters方法:

AppClient如何注册Masters

我们进入Master的源代码:

AppClient如何注册Masters

看一下接受客户端发送过来消息RegisterApplication的代码如下所示:

AppClient如何注册Masters

2、registerApplication:

AppClient如何注册Masters

3.1、上面代码中的changeMaster(masterUrl):

AppClient如何注册Masters

3.2.1、进入实现类SparkDeploySchedulerBackend的connected方法:

AppClient如何注册Masters

4、接着在Master的消息响应中会调用schedule方法:

AppClient如何注册Masters

AppClient如何注册Masters

AppClient如何注册Masters

1.1、进入worker.actor ! LaunchDriver(driver.id, driver.desc)方法:

AppClient如何注册Masters

AppClient如何注册Masters

AppClient如何注册Masters

感谢你的阅读,相信你对“AppClient如何注册Masters”这一问题有一定的了解,快去动手实践吧,如果想了解更多相关知识点,可以关注亿速云网站!小编会继续为大家带来更好的文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI