[
https://issues.apache.org/jira/browse/YARN-11438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17710332#comment-17710332
]
ASF GitHub Bot commented on YARN-11438:
---------------------------------------
slfan1989 commented on code in PR #5537:
URL: https://github.com/apache/hadoop/pull/5537#discussion_r1162123080
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/impl/ZookeeperFederationStateStore.java:
##########
@@ -643,22 +652,52 @@ public GetSubClusterPoliciesConfigurationsResponse
getPoliciesConfigurations(
@Override
public Version getCurrentVersion() {
- throw new NotImplementedException("Code is not implemented");
+ return CURRENT_VERSION_INFO;
}
@Override
public Version loadVersion() throws Exception {
- throw new NotImplementedException("Code is not implemented");
+ if (exists(versionNode)) {
+ byte[] data = get(versionNode);
+ if (data != null) {
+ return new VersionPBImpl(VersionProto.parseFrom(data));
+ }
+ }
+ return null;
}
@Override
public void storeVersion() throws Exception {
- throw new NotImplementedException("Code is not implemented");
+ byte[] data = ((VersionPBImpl)
CURRENT_VERSION_INFO).getProto().toByteArray();
+ boolean isUpdate = false;
Review Comment:
Thank you very much for your help to review the code! I will modify the code.
> [Federation] ZookeeperFederationStateStore Support Version.
> -----------------------------------------------------------
>
> Key: YARN-11438
> URL: https://issues.apache.org/jira/browse/YARN-11438
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: federation
> Affects Versions: 3.4.0
> Reporter: Shilun Fan
> Assignee: Shilun Fan
> Priority: Major
> Labels: pull-request-available
>
> In YARN-5604, we define the method that FederationStateStore supports
> Version, and we will implement this method in ZookeeperFederationStateStore.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]