How AppClient registers Masters
The content of this article mainly revolves around how AppClient registers Masters. The content of the article is clear and easy to understand, and the organization is clear. It is very suitable for beginners to learn and worth reading. Interested friends can read along with Xiaobian. I hope everyone gets something out of this article!
There are two kinds of registered masters, one is registerWithMaster method, the other is tryRegisterAllMasters method, the former is the case of a single Master, the latter is a multi-master, in general, it is to meet the HA mechanism, let's take a look at registerWithMaster method:
The tryRegisterAllMasters method is called:
We enter the Master's source code:
Take a look at the code for accepting the message RegisterApplication sent by the client as follows:
2、registerApplication:
3.1 changeMaster(masterUrl) in the above code:
3.2.1 Enter the connected method of the implementation class SparkDeployScheduler Backend:
4. Then the schedule method will be called in the Master's message response:
1.1 Enter worker.actor. LaunchDriver(driver.id, driver.desc) Method:
Thank you for reading, I believe you have a certain understanding of "AppClient how to register Masters" this issue, go to practice it quickly, if you want to know more related knowledge points, you can pay attention to the website! The editor will continue to bring better articles to everyone!