The visualization of yarn state machine

Source: Internet
Author: User

Yarn in order to implement multiple state machine objects, control ResourceManager intermediate Rmappimpl, Rmapp-attemptimpl, Rmcontainerimpl and Rmnodeimpl, Jobimpl, Taskimpl and Taskattemptimpl in Applicationimpl, Containerimpl, and Localizedresource,mrappmaster in NodeManager.

To make it easier for users to see the state changes and related events for these state machines. Yarn provides a state machine visualization tool. The detailed operation procedure is as follows.

Step 1 Convert the state machine to a file in the Graphviz (. GV) format. run the compile command under the source root folder such as the following:

MVN compile-pvisualize

after this step. The RESOURCEMANAGER.GV, NODEMANAGER.GV, and MAPREDUCE.GV files in the three Graphviz format are generated in the local folder. NODEMANAGER.GV files in the Localizedresource state machine part of the contents such as the following:

Subgraph Cluster_localizedresource {label= "Localizedresource"  "localizedresource.failed" [label = FAILED];  " Localizedresource.downloading "[label = downloading];  " Localizedresource.downloading "," localizedresource.downloading "[Label =" Request,\nrelease "];  " Localizedresource.downloading "," localizedresource.failed "[Label =" localization_failed "];  " Localizedresource.downloading "," localizedresource.localized "[Label =" localized "];  " Localizedresource.init "[label = INIT];  " Localizedresource.init "," localizedresource.downloading "[Label =" REQUEST "];  " localizedresource.localized "[label = localized];  " Localizedresource.localized "," localizedresource.localized "[Label =" Request,\nrelease "];}

Step 2 Use the related commands in the visual package Graphviz to generate the state machine diagram, the shell command details such as the following:

Dot-tpng NODEMANAGER.GV > Nodemanager.png

assuming that the Graphviz package has not been installed, install the package before you operate the procedure, cent OS installation commands such as the following:

sudo yum install Graphviz

Open Nodemanager.png. For example with what is seen (for ease of presentation. Split into two graphs):




Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

The visualization of yarn state machine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.