You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/02/25 21:38:35 UTC

[GitHub] [ozone] avijayanhwx commented on a change in pull request #1933: HDDS-4817. Fresh deploy of Ozone must use the highest layout version by default.

avijayanhwx commented on a change in pull request #1933:
URL: https://github.com/apache/ozone/pull/1933#discussion_r583219859



##########
File path: hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/node/TestSCMNodeManager.java
##########
@@ -211,15 +211,17 @@ public void testScmLayoutOnRegister()
       throws IOException, InterruptedException, AuthenticationException {
 
     try (SCMNodeManager nodeManager = createNodeManager(getConf())) {
-      Integer nodeManagerSoftwareLayoutVersion =
-          nodeManager.getLayoutVersionManager().getSoftwareLayoutVersion();
-      LayoutVersionProto layoutInfoSuccess = LayoutVersionProto.newBuilder()
-          .setMetadataLayoutVersion(1)
-          .setSoftwareLayoutVersion(nodeManagerSoftwareLayoutVersion).build();
-      LayoutVersionProto layoutInfoFailure = LayoutVersionProto.newBuilder()
-          .setMetadataLayoutVersion(1)
-          .setSoftwareLayoutVersion(nodeManagerSoftwareLayoutVersion + 1)
-          .build();
+      HDDSLayoutVersionManager layoutVersionManager =
+          nodeManager.getLayoutVersionManager();
+      int nodeManagerMetadataLayoutVersion =
+          layoutVersionManager.getMetadataLayoutVersion();
+      int nodeManagerSoftwareLayoutVersion =
+          layoutVersionManager.getSoftwareLayoutVersion();
+      LayoutVersionProto layoutInfoSuccess = toLayoutVersionProto(
+          nodeManagerMetadataLayoutVersion, nodeManagerSoftwareLayoutVersion);
+      LayoutVersionProto layoutInfoFailure = toLayoutVersionProto(
+          nodeManagerSoftwareLayoutVersion + 1,

Review comment:
       I was trying to mimic a DN from a future version here (with a new layout feature). I guess either is good, since registration only checks for SLV equality. 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org