[ 
https://issues.apache.org/jira/browse/GOBBLIN-1210?focusedWorklogId=456959&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-456959
 ]

ASF GitHub Bot logged work on GOBBLIN-1210:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jul/20 03:34
            Start Date: 10/Jul/20 03:34
    Worklog Time Spent: 10m 
      Work Description: sv2000 commented on a change in pull request #3057:
URL: https://github.com/apache/incubator-gobblin/pull/3057#discussion_r452604276



##########
File path: 
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinApplicationMaster.java
##########
@@ -104,7 +104,9 @@ public GobblinApplicationMaster(String applicationName, 
String applicationId, Co
 
     if (UserGroupInformation.isSecurityEnabled()) {
       LOGGER.info("Adding YarnContainerSecurityManager since security is 
enabled");
-      
this.applicationLauncher.addService(buildYarnContainerSecurityManager(this.config,
 this.fs));
+      YarnContainerSecurityManager yarnContainerSecurityManager = 
buildYarnContainerSecurityManager(this.config, this.fs);

Review comment:
       We need to be a little careful on when we add the tokens on AM restart. 
In particular, we need to ensure that the new tokens are added into the UGI 
before any HDFS/Hive/RM access happens. Your fix may be ok, but in the future, 
this detail may easily be forgotten and may introduce unintentional bugs. 
   Do you think it would be safer to add the credentials inside the main() of 
the GobblinApplicationMaster? Also, instead of sending a 
DelegationTokenUpdateEvent, a cleaner approach maybe to make the 
readCredentials and addCredentials methods public static and call them directly 
in the main? 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 456959)
    Time Spent: 0.5h  (was: 20m)

> Force AM to read from token file to update token when start up
> --------------------------------------------------------------
>
>                 Key: GOBBLIN-1210
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1210
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to