[
https://issues.apache.org/jira/browse/HADOOP-9933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13762965#comment-13762965
]
Steve Loughran commented on HADOOP-9933:
----------------------------------------
I worry about complicating the service model of every service out there,
because most services would leak all their internal state, threads &c without
stop being called, and its trying to hide a new state into the existing set.
Presumably that's why Guava went that way.
I'd be happier with an explicit PAUSED state which you can enter from started
(& which the service itself can inter from {{serviceStart()}}.
Any service that doesn't support pause can have it as a no-op that stays in
STARTED, meaning it doesn't do a standby operation. If we add a method
{{boolean pause(String reason)}} the service could log the reason (set it what
it is waiting for), and then return true if it actually entered the paused
state.
Returning to the original use case: do you really, really need to be able to
start/stop the services, or can you just destroy & recreate? Is it the internal
state of some of the services that you want to persist?
> Augment Service model to support starting stopped services
> ----------------------------------------------------------
>
> Key: HADOOP-9933
> URL: https://issues.apache.org/jira/browse/HADOOP-9933
> Project: Hadoop Common
> Issue Type: Improvement
> Affects Versions: 2.1.0-beta
> Reporter: Karthik Kambatla
> Assignee: Karthik Kambatla
> Labels: service
>
> For ResourceManager-HA (YARN-149 and co), we would want to start/stop/start
> RM's active services as it transitions to Active/Standby/Active respectively.
> In the current service model, we can't start the services that are already
> stopped.
> Would be nice to augment this. To avoid accidental restart of stopped
> services, we can add another API: start(boolean restartIfStopped). Thoughts?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira