[ https://issues.apache.org/jira/browse/YARN-2136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14225331#comment-14225331 ]
Jian He commented on YARN-2136: ------------------------------- [~varun_saxena], thanks for your wok ! some comments: - In the catch block of each transition(e.g.StoreAppTransition), we can return FENCED state directly. {code} } catch (Exception e) { LOG.error("Error storing app: " + appId, e); store.notifyStoreOperationFailed(e); } {code} - naming suggestion: RMStateStoreEventType.FENCE_STATESTORE -> RMStateStoreEventType.FENCED - rename RMStateStoreState#DEFAULT to ACTIVE. - Fix the indentation format to conform with the rest transitions’ format {code} .addTransition(RMStateStoreState.DEFAULT, RMStateStoreState.DEFAULT, RMStateStoreEventType.UPDATE_APP_ATTEMPT, new UpdateAppAttemptTransition()) .addTransition(RMStateStoreState.DEFAULT, RMStateStoreState.FENCED, RMStateStoreEventType.FENCE_STATESTORE) .addTransition(RMStateStoreState.FENCED, RMStateStoreState.FENCED, EnumSet.of(RMStateStoreEventType.STORE_APP, RMStateStoreEventType.UPDATE_APP, RMStateStoreEventType.REMOVE_APP, RMStateStoreEventType.STORE_APP_ATTEMPT, RMStateStoreEventType.UPDATE_APP_ATTEMPT, RMStateStoreEventType.FENCE_STATESTORE)); {code} - some store operations are invoked outside the transition scope, for example: removeRMDelegationToken, storeRMDelegationTokenAndSequenceNumberState. We need to check the FENCED state in those places too before allowing following operations. - Newly added RMStateStoreFencedEvent, it should be fine to reuse the RMStateStoreEvent and pass the event type ? > RMStateStore can explicitly handle store/update events when fenced > ------------------------------------------------------------------ > > Key: YARN-2136 > URL: https://issues.apache.org/jira/browse/YARN-2136 > Project: Hadoop YARN > Issue Type: Bug > Affects Versions: 2.7.0 > Reporter: Jian He > Assignee: Varun Saxena > Fix For: 2.7.0 > > Attachments: YARN-2136.002.patch, YARN-2136.patch > > > RMStateStore can choose to handle/ignore store/update events upfront instead > of invoking more ZK operations if state store is at fenced state. -- This message was sent by Atlassian JIRA (v6.3.4#6332)