Tsuyoshi OZAWA commented on YARN-1474:

[~kkambatl], thanks for your review.  

And, let us handle the incompatible change to reinitialize in a separate JIRA.

I agree with this point. Fixed the following points in a latest patch:

1. Moved the part corresponding to if (!initialized) to {{serviceInit()}}. 
Moved initialization code to {{initScheduler}} and {{startThreads}} to avoid 
code duplication.
2. Changed to call {{initScheduler}} and {{startThreads}} instead of calling 
{{reinitialize()}} in serviceInit or serviceStart.
3. For the individual threads in the schedulers, init them in serviceInit, but 
call thread.start() in serviceStart()
4. Fixed serviceStop() for CS.
5. Fixed tests based on your idea. 

> Make schedulers services
> ------------------------
>                 Key: YARN-1474
>                 URL: https://issues.apache.org/jira/browse/YARN-1474
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: scheduler
>    Affects Versions: 2.3.0, 2.4.0
>            Reporter: Sandy Ryza
>            Assignee: Tsuyoshi OZAWA
>         Attachments: YARN-1474.1.patch, YARN-1474.10.patch, 
> YARN-1474.11.patch, YARN-1474.12.patch, YARN-1474.13.patch, 
> YARN-1474.14.patch, YARN-1474.15.patch, YARN-1474.2.patch, YARN-1474.3.patch, 
> YARN-1474.4.patch, YARN-1474.5.patch, YARN-1474.6.patch, YARN-1474.7.patch, 
> YARN-1474.8.patch, YARN-1474.9.patch
> Schedulers currently have a reinitialize but no start and stop.  Fitting them 
> into the YARN service model would make things more coherent.

This message was sent by Atlassian JIRA

Reply via email to