ChenSammi commented on code in PR #3292:
URL: https://github.com/apache/ozone/pull/3292#discussion_r848249078


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/endpoint/VersionEndpointTask.java:
##########
@@ -129,4 +136,31 @@ public EndpointStateMachine.EndPointStates call() throws 
Exception {
     }
     return rpcEndPoint.getState();
   }
+
+  private void formatDbVolumesIfNeeded(String scmId, String clusterId) {
+    if (!VersionedDatanodeFeatures.SchemaV3.chooseSchemaVersion()
+        .equals(OzoneConsts.SCHEMA_V3)) {
+      return;
+    }
+
+    MutableVolumeSet dbVolumeSet = ozoneContainer.getDbVolumeSet();
+
+    if (dbVolumeSet != null) {
+      dbVolumeSet.writeLock();
+      try {
+        List<DbVolume> dbVolumeList = StorageVolumeUtil
+            .getDbVolumesList(dbVolumeSet.getVolumesList());
+
+        dbVolumeList.parallelStream().forEach(dbVolume -> {
+          String id = VersionedDatanodeFeatures.ScmHA
+              .chooseContainerPathID(configuration, scmId, clusterId);

Review Comment:
   Move this statement out of the stream.



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

Reply via email to