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

Karthik Kambatla commented on YARN-1172:
----------------------------------------

The approach definitely looks cleaner than our previous approaches. Thanks 
[~ozawa] for your patience with multiple approaches on this. 

Comments:
# Instead of adding getters in RMSecretManagerService, we should use the ones 
in RMContext. 
# Even though it is spurious, it might be good practice to add super.service* 
calls in serviceInit, serviceStart, serviceStop in RMSecretManagerService
# Nit: Very subjective - would be nice to import individual classes than *
{code}
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
import org.apache.hadoop.yarn.server.resourcemanager.security.*;
{code}
# Nit: Would move rmSecretManagerService right next to other "Active" services
{code}
  protected AdminService adminService;
  protected RMSecretManagerService rmSecretManagerService;
{code}
# ResourceManager still has methods to create SecretManagers. These are no 
longer used and should be removed. MockRM and other test cases might be 
overriding these methods, and need to be updated to preserve the behavior. For 
this, we might either have to keep these methods in the RM and use them in the 
RMSecretManagerService to create the SecretManagers or move them entirely to 
RMSecretManagerService. The latter seems cleaner; it appears the patch adds one 
such method to RMSecretManagerService.
# An anonymous class that overrides the method might be more preferable.
{code}
    @Override
    protected RMSecretManagerService createRMSecretManagerService() {
      return new MyRMSecretManagerService(conf, rmContext);
    }

    class MyRMSecretManagerService extends RMSecretManagerService {

      public MyRMSecretManagerService(
          Configuration conf, RMContextImpl rmContext) {
        super(conf, rmContext);
      }

      @Override
      protected RMDelegationTokenSecretManager
      createRMDelegationTokenSecretManager(Configuration conf,
{code}

> Convert *SecretManagers in the RM to services
> ---------------------------------------------
>
>                 Key: YARN-1172
>                 URL: https://issues.apache.org/jira/browse/YARN-1172
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 2.1.0-beta
>            Reporter: Karthik Kambatla
>            Assignee: Tsuyoshi OZAWA
>         Attachments: YARN-1172.1.patch, YARN-1172.10.patch, 
> YARN-1172.11.patch, YARN-1172.12.patch, YARN-1172.13.patch, 
> YARN-1172.2.patch, YARN-1172.3.patch, YARN-1172.4.patch, YARN-1172.5.patch, 
> YARN-1172.6.patch, YARN-1172.7.patch, YARN-1172.8.patch, YARN-1172.9.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to