[
https://issues.apache.org/jira/browse/TWILL-175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15447035#comment-15447035
]
ASF GitHub Bot commented on TWILL-175:
--------------------------------------
Github user chtyim commented on a diff in the pull request:
https://github.com/apache/twill/pull/6#discussion_r76685965
--- Diff:
twill-yarn/src/main/hadoop20/org/apache/twill/internal/yarn/Hadoop20YarnAppClient.java
---
@@ -176,22 +184,27 @@ private void addRMToken(ContainerLaunchContext
context) {
@Override
public ProcessController<YarnApplicationReport>
createProcessController(ApplicationId appId) {
- return new ProcessControllerImpl(yarnClient, appId);
+ return new ProcessControllerImpl(createYarnClient(), appId);
}
@Override
public List<NodeReport> getNodeReports() throws Exception {
- return this.yarnClient.getNodeReports();
+ YarnClient yarnClient = createYarnClient();
+ try {
+ return yarnClient.getNodeReports();
+ } finally {
+ yarnClient.stop();
+ }
}
@Override
protected void startUp() throws Exception {
- yarnClient.start();
+ // no-op. We will create and start YarnClients, on demand
--- End diff --
Maybe we should make `YarnAppClient` not a `Service` at all. It seems like
there is no need for any lifecycle management.
> Hadoop21YarnAppClient caches a YarnClient
> -----------------------------------------
>
> Key: TWILL-175
> URL: https://issues.apache.org/jira/browse/TWILL-175
> Project: Apache Twill
> Issue Type: Bug
> Affects Versions: 0.7.0-incubating
> Reporter: Ali Anwar
> Assignee: Ali Anwar
> Fix For: 0.8.0
>
>
> Hadoop21YarnAppClient caches a YarnClient.
> Internally, YarnClient is only useful for a single UserGroupInformation.
> Because of this, you can not use the same Hadoop21YarnAppClient for multiple
> UGIs.
> The Hadoop21YarnAppClient class should use a different YarnClient for each
> UGI.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)