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

Bikas Saha commented on YARN-1068:
----------------------------------

This should probably creating a new conf and override it instead of changing 
things in the original conf.
{code}
+      YarnConfiguration conf = (YarnConfiguration) getConf();
+      conf.set(YarnConfiguration.RM_HA_ID, rmId);
+      return new RMHAServiceTarget(conf);
{code}

Shoudlnt it be "transitionToActive"?
{code}
+      RMAuditLogger.logFailure(user.getShortUserName(), "transitionToStandby",
+          adminAcl.toString(), "RMHAProtocolService",
+          "Exception transitioning to active");
{code}

We shouldnt be wrapping some unknown exception into an AccessControlException
{code}
+  private UserGroupInformation checkAccess(String method) throws 
AccessControlException {
+    try {
+      return RMServerUtils.verifyAccess(adminAcl, method, LOG);
+    } catch (YarnException e) {
+      throw new AccessControlException(e);
+    }
{code}

This method isnt even throwing an accesscontrolexception. Then why are 
transitionToStandby() etc changing signature to throw AccessControlException.
{code}
+  public static UserGroupInformation verifyAccess(
+      AccessControlList acl, String method, final Log LOG)
+      throws YarnException {
{code}

New name doesnt seem to follow convention based on other names in that file. 
YARN_SECURITY_SERVICE_AUTHORIZATION_FOO
{code}
     new Service(
         
YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_CONTAINER_MANAGEMENT_PROTOCOL,
 
         ContainerManagementProtocolPB.class),
+    new Service(
+        CommonConfigurationKeys.SECURITY_HA_SERVICE_PROTOCOL_ACL,
+        HAServiceProtocol.class),
{code}

> Add admin support for HA operations
> -----------------------------------
>
>                 Key: YARN-1068
>                 URL: https://issues.apache.org/jira/browse/YARN-1068
>             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-1068-10.patch, yarn-1068-1.patch, 
> yarn-1068-2.patch, yarn-1068-3.patch, yarn-1068-4.patch, yarn-1068-5.patch, 
> yarn-1068-6.patch, yarn-1068-7.patch, yarn-1068-8.patch, yarn-1068-9.patch, 
> yarn-1068-prelim.patch
>
>
> Support HA admin operations to facilitate transitioning the RM to Active and 
> Standby states.



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

Reply via email to