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

Jian He commented on YARN-1307:
-------------------------------

Thanks [~ozawa] for taking this jira,  some comments:
- This patch contains some version info changes, we can leave that in 
YARN-1239, only changing ZK is not enough. we should do that as a common 
RMStateStore change for both HDFS and zk
- new method createRootDir(String rootPath, byte[] data) is not used anywhere, 
we can remove that.
- stream not closed. 
{code}
 ByteArrayOutputStream seqOs = new ByteArrayOutputStream();
    DataOutputStream seqOut = new DataOutputStream(seqOs);
{code}

- can you refactor current state store internal APIs(store/update etc.) to take 
in ApplicaitionId/AttemptId objects? in this way, we don't need to first 
convert from ID object to String and then again covert back to object, thanks.
{code}
 storeApplicationAttemptStateInternal(
      String attemptId, ApplicationAttemptStateDataPBImpl attemptStateDataPB)
ApplicationAttemptId appAttemptId =
        ConverterUtils.toApplicationAttemptId(attemptId);
{code}

- This new method iterates the whole app directory again while loadRMAppState 
method is already iterating the whole app directory, unnecessary overhead. 
{code}
        loadApplicationAttemptState(rmState, appId);
{code}

- didn't see the need of creating a new ZNode structure. stat object inside is 
not used and needed.  I think just return data is fine.


> Rethink znode structure for RM HA
> ---------------------------------
>
>                 Key: YARN-1307
>                 URL: https://issues.apache.org/jira/browse/YARN-1307
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Tsuyoshi OZAWA
>            Assignee: Tsuyoshi OZAWA
>         Attachments: YARN-1307.1.patch, YARN-1307.2.patch, YARN-1307.3.patch, 
> YARN-1307.4-2.patch, YARN-1307.4-3.patch, YARN-1307.4.patch
>
>
> Rethink for znode structure for RM HA is proposed in some JIRAs(YARN-659, 
> YARN-1222). The motivation of this JIRA is quoted from Bikas' comment in 
> YARN-1222:
> {quote}
> 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.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to