[
https://issues.apache.org/jira/browse/GOBBLIN-2004?focusedWorklogId=909761&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909761
]
ASF GitHub Bot logged work on GOBBLIN-2004:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 13/Mar/24 21:53
Start Date: 13/Mar/24 21:53
Worklog Time Spent: 10m
Work Description: phet commented on code in PR #3891:
URL: https://github.com/apache/gobblin/pull/3891#discussion_r1523959194
##########
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinYarnAppLauncher.java:
##########
@@ -898,49 +858,31 @@ private Path getHdfsLogDir(Path appWorkDir) throws
IOException {
return logRootDir;
}
- private AbstractYarnAppSecurityManager buildSecurityManager() throws
IOException {
+ /**
+ *
+ * @return
+ * @throws IOException
+ */
+ private AbstractAppSecurityManager buildSecurityManager() throws IOException
{
Path tokenFilePath = new Path(this.fs.getHomeDirectory(),
this.applicationName + Path.SEPARATOR +
GobblinYarnConfigurationKeys.TOKEN_FILE_NAME);
+ String securityManagerClassName = ConfigUtils.getString(config,
GobblinYarnConfigurationKeys.SECURITY_MANAGER_CLASS,
GobblinYarnConfigurationKeys.DEFAULT_SECURITY_MANAGER_CLASS);
- ClassAliasResolver<AbstractYarnAppSecurityManager> aliasResolver = new
ClassAliasResolver<>(
- AbstractYarnAppSecurityManager.class);
try {
- return (AbstractYarnAppSecurityManager)
GobblinConstructorUtils.invokeLongestConstructor(Class.forName(aliasResolver.resolve(
- ConfigUtils.getString(config,
GobblinYarnConfigurationKeys.SECURITY_MANAGER_CLASS,
GobblinYarnConfigurationKeys.DEFAULT_SECURITY_MANAGER_CLASS))), this.config,
this.helixManager, this.fs,
- tokenFilePath);
+ if (helixClusterLifecycleManager.isPresent()) {
+ HelixManager helixManager =
helixClusterLifecycleManager.get().getHelixManager();
+ ClassAliasResolver<AbstractYarnAppSecurityManager> aliasResolver = new
ClassAliasResolver<>(AbstractYarnAppSecurityManager.class);
+ return (AbstractYarnAppSecurityManager)
GobblinConstructorUtils.invokeLongestConstructor(Class.forName(aliasResolver.resolve(securityManagerClassName)),
this.config, helixManager, this.fs,
+ tokenFilePath);
+ }
+
+ ClassAliasResolver aliasResolver = new
ClassAliasResolver<>(AbstractAppSecurityManager.class);
+ return (AbstractAppSecurityManager)
GobblinConstructorUtils.invokeLongestConstructor(Class.forName(aliasResolver.resolve(securityManagerClassName)),
this.config, this.fs, tokenFilePath);
Review Comment:
aah, ok... never hit that so never would have suspected.
just add a code comment to pass along this critical tidbit
Issue Time Tracking
-------------------
Worklog Id: (was: 909761)
Time Spent: 3h 20m (was: 3h 10m)
> Make a Gobblin yarn app launcher that does not depend on Helix
> --------------------------------------------------------------
>
> Key: GOBBLIN-2004
> URL: https://issues.apache.org/jira/browse/GOBBLIN-2004
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Matthew Ho
> Priority: Major
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)