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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]