Github user gauravgopi123 commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/337#discussion_r63919097
  
    --- Diff: 
engine/src/main/java/com/datatorrent/stram/client/StramAppLauncher.java ---
    @@ -577,17 +604,9 @@ public ApplicationId launchApp(AppFactory appConfig) 
throws Exception
         dag.setAttribute(LogicalPlan.HDFS_TOKEN_LIFE_TIME, 
hdfsTokenMaxLifeTime);
         long rmTokenMaxLifeTime = 
conf.getLong(StramClientUtils.DT_RM_TOKEN_MAX_LIFE_TIME, 
conf.getLong(YarnConfiguration.DELEGATION_TOKEN_MAX_LIFETIME_KEY, 
YarnConfiguration.DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT));
         dag.setAttribute(LogicalPlan.RM_TOKEN_LIFE_TIME, rmTokenMaxLifeTime);
    -    if (conf.get(StramClientUtils.KEY_TAB_FILE) != null) {
    -      dag.setAttribute(LogicalPlan.KEY_TAB_FILE, 
conf.get(StramClientUtils.KEY_TAB_FILE));
    -    } else if (conf.get(StramUserLogin.DT_AUTH_KEYTAB) != null) {
    -      Path localKeyTabPath = new 
Path(conf.get(StramUserLogin.DT_AUTH_KEYTAB));
    -      try (FileSystem fs = StramClientUtils.newFileSystemInstance(conf)) {
    -        Path destPath = new Path(StramClientUtils.getDTDFSRootDir(fs, 
conf), localKeyTabPath.getName());
    -        if (!fs.exists(destPath)) {
    -          fs.copyFromLocalFile(false, false, localKeyTabPath, destPath);
    -        }
    -        dag.setAttribute(LogicalPlan.KEY_TAB_FILE, destPath.toString());
    -      }
    +    // TODO:- Need to see if other token refresh attributes are needed if 
security is not enabled
    +    if (UserGroupInformation.isSecurityEnabled()) {
    +      setTokenRefreshKeytab(dag, conf);
    --- End diff --
    
    Is this refactoring required? This function is not used any where else 
too....
    I don't see any change in the existing code and refactored code other than 
one new log message at warn level



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to