[ 
https://issues.apache.org/jira/browse/HADOOP-9933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13761784#comment-13761784
 ] 

Karthik Kambatla commented on HADOOP-9933:
------------------------------------------

As reported in YARN-1165, creating a new instance of {{RMActiveServices}} only 
in {{ResourceManager#serviceStart()}} leads to failure of several tests that 
expect to see instances of the component services. It would really help if we 
could implement the restartable services soon.

Meanwhile, I thought about how we could do this. At least for the problem at 
hand, it is enough to add a transition from (STARTED --> INITIALIZED) on a call 
to reset() (or suspend()). On transitionToStandby(), the RM services reset() to 
clear all their internal state and stop any servers they might be running. On 
transitionToActive(), the servers are started and new state is created as the 
RM starts serving.

If this sounds like a resonable approach, I can go ahead and work on POC 
patches to see how it looks.

Thoughts?

                
> 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

Reply via email to