ChenSammi commented on code in PR #8566:
URL: https://github.com/apache/ozone/pull/8566#discussion_r2194270254
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/scm/protocolPB/ScmBlockLocationProtocolClientSideTranslatorPB.java:
##########
@@ -283,7 +289,8 @@ public ScmInfo getScmInfo() throws IOException {
resp = wrappedResponse.getGetScmInfoResponse();
ScmInfo.Builder builder = new ScmInfo.Builder()
.setClusterId(resp.getClusterId())
- .setScmId(resp.getScmId());
+ .setScmId(resp.getScmId())
+ .setMetaDataLayoutVersion(resp.getMetaDataLayoutVersion());
Review Comment:
Have to check when metadataLayoutVersion field exists before call
esp.getMetaDataLayoutVersion(). Here is an example.
```
if (token.hasSecretKeyId()) {
setSecretKeyId(token.getSecretKeyId());
}
```
Please add a unit test that getScmInfo handle proto object with and without
metaDataLayoutVersion field.
--
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]