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

Karthik Kambatla commented on YARN-1318:
----------------------------------------

This is more complicated than just moving the AdminService to the Always-On 
services list. (Has been a while since I worked on the first patch of 
YARN-1068, and forgot the complexity of this alternative approach.)

AdminService constructor declaration looks like
{code}
  public AdminService(Configuration conf, ResourceScheduler scheduler, 
      RMContext rmContext, NodesListManager nodesListManager, 
      ClientRMService clientRMService, 
      ApplicationMasterService applicationMasterService,
      ResourceTrackerService resourceTrackerService) {
{code}

Even if we move ClientRMService, ApplicationMasterService and 
ResourceTrackerService to Always-On, we still need the ResourceScheduler and 
NodesListManager which are ActiveServices. I think the best way forward is the 
constructor should only take RMContext and everything else should be picked 
from there. 

RMContext constructor currently looks like:
{code}
  public RMContextImpl(Dispatcher rmDispatcher,
      RMStateStore store,
      ContainerAllocationExpirer containerAllocationExpirer,
      AMLivelinessMonitor amLivelinessMonitor,
      AMLivelinessMonitor amFinishingMonitor,
      DelegationTokenRenewer delegationTokenRenewer,
      AMRMTokenSecretManager amRMTokenSecretManager,
      RMContainerTokenSecretManager containerTokenSecretManager,
      NMTokenSecretManagerInRM nmTokenSecretManager,
      ClientToAMTokenSecretManagerInRM clientToAMTokenSecretManager) {
{code}
RMContext should be initialized before any of the other ActiveServices are, 
which requires switching over completely to a create RMContext first up, and 
set each field when the corresponding RM service/component is created. 

Does this seem like a reasonable approach?

> Promote AdminService to an Always-On service
> --------------------------------------------
>
>                 Key: YARN-1318
>                 URL: https://issues.apache.org/jira/browse/YARN-1318
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 2.3.0
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>              Labels: ha
>
> Per discussion in YARN-1068, we want AdminService to handle HA-admin 
> operations in addition to the regular non-HA admin operations. To facilitate 
> this, we need to move AdminService an Always-On service. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to