[
https://issues.apache.org/jira/browse/GOBBLIN-1210?focusedWorklogId=462060&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-462060
]
ASF GitHub Bot logged work on GOBBLIN-1210:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Jul/20 13:26
Start Date: 22/Jul/20 13:26
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_r458786811
##########
File path:
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnHelixUtils.java
##########
@@ -65,6 +71,23 @@ public static void writeTokenToFile(Token<? extends
TokenIdentifier> token, Path
credentials.writeTokenStorageFile(tokenFilePath, configuration);
}
+ /**
+ * Update {@link Token} with token file in resources.
+ *
+ * @param
+ * @throws IOException
+ */
+ public void updateToken() throws IOException{
Review comment:
Can this method be made static?
##########
File path:
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinYarnTaskRunner.java
##########
@@ -201,6 +201,8 @@ public static void main(String[] args) {
if (!Strings.isNullOrEmpty(helixInstanceTags)) {
config =
config.withValue(GobblinClusterConfigurationKeys.HELIX_INSTANCE_TAGS_KEY,
ConfigValueFactory.fromAnyRef(helixInstanceTags));
}
+ YarnHelixUtils utils = new YarnHelixUtils();
Review comment:
Do you need to new the utils class? Can't the updateToken() be made
public static?
##########
File path:
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinYarnAppLauncher.java
##########
@@ -877,18 +880,17 @@ private Path getHdfsLogDir(Path appWorkDir) throws
IOException {
return logRootDir;
}
- private AbstractYarnAppSecurityManager buildSecurityManager() throws
IOException {
+ private AbstractYarnAppSecurityManager buildSecurityManager(boolean
isReconnected) throws IOException {
Path tokenFilePath = new Path(this.fs.getHomeDirectory(),
this.applicationName + Path.SEPARATOR +
GobblinYarnConfigurationKeys.TOKEN_FILE_NAME);
ClassAliasResolver<AbstractYarnAppSecurityManager> aliasResolver = new
ClassAliasResolver<>(
AbstractYarnAppSecurityManager.class);
try {
- return
(AbstractYarnAppSecurityManager)ConstructorUtils.invokeConstructor(Class.forName(aliasResolver.resolve(
+ 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);
- } catch (NoSuchMethodException | IllegalAccessException |
InvocationTargetException | InstantiationException
- | ClassNotFoundException e) {
+ tokenFilePath, isReconnected);
+ } catch (ReflectiveOperationException e) {
Review comment:
+1 on consolidating all the exceptions into ReflectiveOperationException.
##########
File path:
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnHelixUtils.java
##########
@@ -24,12 +24,14 @@
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
+import org.apache.gobblin.cluster.GobblinClusterUtils;
Review comment:
This looks like an unused import.
##########
File path:
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinApplicationMaster.java
##########
@@ -227,7 +227,8 @@ public static void main(String[] args) throws Exception {
printUsage(options);
System.exit(1);
}
-
+ YarnHelixUtils utils = new YarnHelixUtils();
Review comment:
See comment below about making the updateToken() method static.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 462060)
Time Spent: 1h 10m (was: 1h)
> 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: 1h 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)