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

Karthik Kambatla commented on YARN-1098:
----------------------------------------

Thanks for the quick review, Alejandro.

bq. ResourceManager.ActiveServices: wouldn't make the code in the RM simpler if 
the ActiveServices class is an outer class?
 
Good point. I did consider doing that. However, MockRM and other tests that 
(in)directly extend the RM would then have to extend both the RM and 
ActiveServices. If we think that is okay, I ll be happy to move it out to an 
outer class.

bq. ResourceManager.ActiveServices: is there any reason why the instantiation 
of components in the serviceInit() is delegate to the ResourceManager instead 
being brought into the ActiveServices class?

MockRM and other tests that extend the RM override some of the create* methods. 
Assuming it makes sense to keep ActiveServices in the RM as an inner class, it 
is cleaner if the create* methods live in the RM and ActiveServices uses them.

bq. ResourceManager: the setRMStateStore() method takes 3 params RMContext, 
Dispatcher and RMStateStore. The last 2 are part of the context already, 
wouldn't make sense to just pass the context?

There are a few other cases like this in create* methods. Fixing these, along 
with their overridden implementations, will add more complexity to this patch. 
I was trying to limit the changes to reorganization of services in the RM. Is 
it okay if we clean these up in another JIRA?

bq. ResourceManager: the ActiveServices should be instantiated on service 
start, this would take care of creating a whole new set of services on every 
start solving the restart issue you reported.

Good idea. I ll move this to serviceStart() in the next version of the patch. 
Once HADOOP-9933 is resolved, we can update this.

bq. ResourceManager.ActiveServices: webApp instance var seems not to be 
instantiated anywhere.
Will fix this as well.
                
> Separate out RM services into "Always On" and "Active"
> ------------------------------------------------------
>
>                 Key: YARN-1098
>                 URL: https://issues.apache.org/jira/browse/YARN-1098
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 2.1.0-beta
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>              Labels: ha
>         Attachments: yarn-1098-1.patch, yarn-1098-2.patch, 
> yarn-1098-approach.patch, yarn-1098-approach.patch
>
>
> From discussion on YARN-1027, it makes sense to separate out services that 
> are stateful and stateless. The stateless services can  run perennially 
> irrespective of whether the RM is in Active/Standby state, while the stateful 
> services need to  be started on transitionToActive() and completely shutdown 
> on transitionToStandby().
> The external-facing stateless services should respond to the client/AM/NM 
> requests depending on whether the RM is Active/Standby.

--
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