xiaoyuyao commented on a change in pull request #1049:
URL: https://github.com/apache/hadoop-ozone/pull/1049#discussion_r439132746



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManagerV2Impl.java
##########
@@ -420,10 +392,50 @@ public void scrubPipeline(ReplicationType type, 
ReplicationFactor factor)
           " since it stays at ALLOCATED stage for " +
           Duration.between(currentTime, p.getCreationTimestamp()).toMinutes() +
           " mins.");
-      finalizeAndDestroyPipeline(p, false);
+      closePipeline(p, false);
+      closeContainersForPipeline(p.getId());
     }
   }
 
+  private void scrubClosedPipeline(
+      ReplicationType type, ReplicationFactor factor, Instant currentTime)
+      throws IOException {
+    long pipelineDestroyTimeoutInMillis =
+        conf.getTimeDuration(ScmConfigKeys.OZONE_SCM_PIPELINE_DESTROY_TIMEOUT,
+            ScmConfigKeys.OZONE_SCM_PIPELINE_DESTROY_TIMEOUT_DEFAULT,
+            TimeUnit.MILLISECONDS);
+    List<Pipeline> closedPipelines = stateManager.getPipelines(type, factor,
+        Pipeline.PipelineState.CLOSED).stream()

Review comment:
       Should we avoid the stream api for better performance ?




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to