xBis7 commented on code in PR #3741:
URL: https://github.com/apache/ozone/pull/3741#discussion_r1121673330


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java:
##########
@@ -116,8 +117,25 @@ public HddsDatanodeService(boolean printBanner, String[] 
args) {
     this.args = args != null ? Arrays.copyOf(args, args.length) : null;
   }
 
+  private void cleanTmpDir() {
+    if (datanodeStateMachine != null) {
+      MutableVolumeSet volumeSet =
+          datanodeStateMachine.getContainer().getVolumeSet();
+      for (HddsVolume hddsVolume : StorageVolumeUtil.getHddsVolumesList(

Review Comment:
   @neils-dev In `ScmHAFinalizeUpgradeActionDatanode` we are iterating 
`volumeSet.getVolumesList()` which returns all volumes and in that case, it 
makes sense to check their instance. 
   
   Here, we are wraping the `volumeSet.getVolumesList()` with 
`StorageVolumeUtil.getHddsVolumesList(volume list)` which filters the volumes 
and returns only the HddsVolumes.
   
   
https://github.com/apache/ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/utils/StorageVolumeUtil.java#L66



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