Apache9 commented on pull request #2890: URL: https://github.com/apache/hbase/pull/2890#issuecomment-761302815
It is really a pain. We need a full redesign of the ChoreService and ScheduledChore. After reading the code, I think the intention here is that, if the stopper is stopped, we will cleanup the ScheduledChore, otherwise even if we call cancel, it only means we want to cancel it from the current ChoreService, and we could still schedule it again, with the current ChoreService or another one. But in our code, lots of places just assume that, a simple cancel will do the clean up work. In general, I do not think in our code base, we want to switch the ChoreService so I do not think we need the different semantic for cancel and stop. I think this is also why in our code base we just use cancel to clean up the chore when shutting down. But unluckily, ChoreService and ScheduledChore are marked as IA.Public, so we can not change its public facing API. But I do not think these two classes should be marked as IA.Public. We are providing a SDK to users for connecting with HBase Cluster, not a scheduler framework. So in this patch, I just added a shutdown method for cleanup the chore, but I would like to open another issue to change the IA annotation of these two classes to IA.Private, and then give it a full redesign. Thanks. ---------------------------------------------------------------- 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]
