[ 
https://issues.apache.org/jira/browse/YARN-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13772273#comment-13772273
 ] 

Bikas Saha commented on YARN-1222:
----------------------------------

Other improvements carried over from YARN-353
We should be storing the information inside the data of the znode instead of 
encoding it in the name of the znode. The rename pattern was followed as an 
optimization in FSStore but is not necessary in ZKStore give set-with-overwrite 
operations. Its also better to avoid encoding the info in the name since doing 
"ls" in ZK is more relaxed wrt permissions than it is in FileSystem.
{code}
+      if (childNodeName.startsWith(DELEGATION_TOKEN_SEQUENCE_NUMBER_PREFIX)) {
+        rmState.rmSecretManagerState.dtSequenceNumber =
+            Integer.parseInt(childNodeName.split("_")[1])
{code}

We should move to creating a node hierarchy for apps such that all znodes for 
an app are stored under an app znode instead of the app root znode. This will 
help in removeApplication and also in scaling better on ZK. The earlier code 
was written this way to ensure create/delete happens under a root znode for 
fencing. But given that we have moved to multi-operations globally, this isnt 
required anymore.

storeRMDTMasterKeyState() is not using multi-operation. We should be issuing 
every action on ZK using a multi-operation for fencing to work.
                
> Make improvements in ZKRMStateStore for fencing
> -----------------------------------------------
>
>                 Key: YARN-1222
>                 URL: https://issues.apache.org/jira/browse/YARN-1222
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Bikas Saha
>
> Using multi-operations for every ZK interaction. 
> In every operation, automatically creating/deleting a lock znode that is the 
> child of the root znode. This is to achieve fencing by modifying the 
> create/delete permissions on the root znode.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to