[ 
https://issues.apache.org/jira/browse/YARN-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsuyoshi OZAWA updated YARN-1474:
---------------------------------

    Attachment: YARN-1474.12.patch

Thank you for the great review, [~kkambatl]! Updated a patch to address the 
points. I believe that this latest patch gets much simpler than previous one by 
your review.

This is the reply to your review comments and change logs in this patch:
1. TestRMDelegationTokens causes  NPE in AllocationFileLoaderService#stop() if 
we don't check null. This is regression. Therefore, this patch still includes 
the null check in AllocationFileLoaderService. Please let me know if we accept 
this regression. Attached log when TestRMDelegationTokens causes NPE in the 
tail of this comments.
2. Added spaces between each interface ResourceSchedulerWrapper implements.
3. Updated a comment about ResourceScheduler#setRMContext()
4. Changed to call {{reinitialize()}} from serviceInit()/serviceStart() in all 
schedulers.
5. FairScheduler: Removed isUpdateThreadRunning/isSchedulingThreadRunning from 
FairScheduler.
6. FairScheduler: serviceStartInternal()/serviceStopInternal() is removed in 4.
7, 8. Changed to call updateThread/schedulingThread#join in serviceStop(). 
Additionally, AllocationFileLoaderService#reloadThread has same problem, so I 
changed to call join in AllocationFileLoaderService#stop() method.

{quote}
java.lang.NullPointerException
        at 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationFileLoaderService.stop(AllocationFileLoaderService.java:149)
        at 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.serviceStop(FairScheduler.java:1268)
        at 
org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)
        at 
org.apache.hadoop.service.ServiceOperations.stop(ServiceOperations.java:52)
        at 
org.apache.hadoop.service.ServiceOperations.stopQuietly(ServiceOperations.java:80)
        at 
org.apache.hadoop.service.CompositeService.stop(CompositeService.java:157)
        at 
org.apache.hadoop.service.CompositeService.serviceStop(CompositeService.java:131)
        at 
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.serviceStop(ResourceManager.java:506)
        at 
org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)
        at 
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.stopActiveServices(ResourceManager.java:839)
        at 
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.transitionToStandby(ResourceManager.java:889)
        at 
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceStop(ResourceManager.java:944)
        at 
org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)
        at 
org.apache.hadoop.yarn.server.resourcemanager.security.TestRMDelegationTokens.testRMDTMasterKeyStateOnRollingMasterKey(TestRMDelegationTokens.java:124)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
{quote}

> 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
>            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.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
(v6.2#6252)

Reply via email to