Github user kishoreg commented on the pull request:
https://github.com/apache/helix/pull/35#issuecomment-138981788
@liyinan926
https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/api/StateTransitionHandlerFactory.java
If you look at the methods here, you should be able to get references to all
TransitionHandlers.
getResourceSet and then for each resource get PartitionSet and for each
partition get the transition handler. You can then call shutdown on the
transition handler.
Note that I agree with you that we need a way to gracefully shutdown all
transition handlers but it would be great to handle this in one place and make
it common to all transition handlers rather than making it specific to
taskstatemodel. Do you think you can extend this change to all transition
handler? Note that with this we only need to have a shutdownhook in
helixstatemachineengine and we should be able to get references to all
statemodels.
This will also slow down the shutdown process depending on whats done in
shutdown method. May be we can use a marker interface to indicate that
shutdown method should be invoked for these handlers
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---