[ 
https://issues.apache.org/jira/browse/TWILL-175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15447029#comment-15447029
 ] 

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_r76685638
  
    --- Diff: 
twill-yarn/src/main/hadoop20/org/apache/twill/internal/yarn/Hadoop20YarnAppClient.java
 ---
    @@ -62,18 +62,26 @@
     public final class Hadoop20YarnAppClient extends AbstractIdleService 
implements YarnAppClient {
     
       private static final Logger LOG = 
LoggerFactory.getLogger(Hadoop20YarnAppClient.class);
    -  private final YarnClient yarnClient;
    +  private final Configuration configuration;
       private String user;
     
       public Hadoop20YarnAppClient(Configuration configuration) {
    -    this.yarnClient = new YarnClientImpl();
    -    yarnClient.init(configuration);
    +    this.configuration = configuration;
         this.user = System.getProperty("user.name");
       }
     
    +  // Creates and starts a yarn client
    +  private YarnClient createYarnClient() {
    +    YarnClient yarnClient = new YarnClientImpl();
    +    yarnClient.init(configuration);
    +    yarnClient.start();
    +    return yarnClient;
    +  }
    +
       @Override
       public ProcessLauncher<ApplicationMasterInfo> 
createLauncher(TwillSpecification twillSpec,
                                                                    @Nullable 
String schedulerQueue) throws Exception {
    +    final YarnClient yarnClient = createYarnClient();
    --- End diff --
    
    Nevermind, I found it.


> 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)

Reply via email to