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/10/08 12:24:49 UTC

[GitHub] [ozone] JacksonYao287 commented on pull request #2578: HDDS-5671. ContainerBalancer#stop should prevent the current balancing thread from interrupting itself.

JacksonYao287 commented on pull request #2578:
URL: https://github.com/apache/ozone/pull/2578#issuecomment-938600805


   IMHO, it is better off using a completeableFuture to run balancer asynchronously , not an os thread.
   
   1 when we are going to start a balancer ,  if the completeableFuture `isDone()` or null , we can create a new completeableFuture to run balancer asynchronously.
   
   2 when we want to check the balancer status , just return `completeableFuture.isDone() || completeableFuture == null`
   
   3 if we want to stop balancer from command line when balancer is running , just call something like `cancel()` or else.
   
   4 if completeableFuture completes, nothing to do.
   
   this is the basic idea, please take a deep thought!
   


-- 
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: issues-unsubscribe@ozone.apache.org

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