[ https://issues.apache.org/jira/browse/YARN-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14496103#comment-14496103 ]
Rohith commented on YARN-2268: ------------------------------ I propose the following way to handle disallow state store when RM is running. For both HA(Active and Standby) and Non-HA, it is possible to get RM state using REST API getClusterInfo('ws/v1/cluster/info'). This can be make use for identifying RM state. This is independent of any state store implementaions. In HA, ACTIVE state is checked with all the the RM-Id's in a sequential manner. If no ACTIVE state RM is found then format the store otherwise throw an exception *ActiveResourceManagerRunningException*. Cons : Formatting state store when HA is enabled is *Best Effort* basis, there would be scenario where RM state can be chagned after one of the RM is checked. Kindly share your thoughts on this approach.. > Disallow formatting the RMStateStore when there is an RM running > ---------------------------------------------------------------- > > Key: YARN-2268 > URL: https://issues.apache.org/jira/browse/YARN-2268 > Project: Hadoop YARN > Issue Type: Bug > Components: resourcemanager > Affects Versions: 2.6.0 > Reporter: Karthik Kambatla > Assignee: Rohith > > YARN-2131 adds a way to format the RMStateStore. However, it can be a problem > if we format the store while an RM is actively using it. It would be nice to > fail the format if there is an RM running and using this store. -- This message was sent by Atlassian JIRA (v6.3.4#6332)