You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Feng Yuan (JIRA)" <ji...@apache.org> on 2017/05/26 03:12:04 UTC

[jira] [Comment Edited] (YARN-6630) Container worker dir could not recover when NM restart

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

Feng Yuan edited comment on YARN-6630 at 5/26/17 3:11 AM:
----------------------------------------------------------

Hi, wy {code}ContainerRetryPolicy{code} is configuarable,for example if you are using DistributeShell app you can set this by parameter:*--container_retry_policy*.
IMO,{code}yarn.nodemanager.recovery.enabled=true{code} and {code}ContainerRetryPolicy= NEVER_RETRY{code} is not ambivalent.
I think ContainerRetryPolicy is create to let app control which container should retry which not.
For example in ApplicationMaster assemble ContainerLaunchContext, can set this.



was (Author: feng yuan):
Hi, wy {code}ContainerRetryPolicy{code} is configuarable,for example if you are using DistributeShell app you can set this by parameter:*--container_retry_policy*.
IMO,{code}yarn.nodemanager.recovery.enabled=true{code} and {code}ContainerRetryPolicy= NEVER_RETRY{code} is not ambivalent.
I think ContainerRetryPolicy is create to let app control which container should retry which not.


> Container worker dir could not recover when NM restart
> ------------------------------------------------------
>
>                 Key: YARN-6630
>                 URL: https://issues.apache.org/jira/browse/YARN-6630
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Yang Wang
>         Attachments: YARN-6630.001.patch
>
>
> When yarn.nodemanager.recovery.enabled is true and ContainerRetryPolicy is NEVER_RETRY, container worker dir will not be saved in NM state store. 
> {code:title=ContainerLaunch.java}
> ...
>   private void recordContainerWorkDir(ContainerId containerId,
>       String workDir) throws IOException{
>     container.setWorkDir(workDir);
>     if (container.isRetryContextSet()) {
>       context.getNMStateStore().storeContainerWorkDir(containerId, workDir);
>     }
>   }
> {code}
> Then NM restarts, container.workDir is null, and may cause other exceptions.
> {code:title=ContainerImpl.java}
>   static class ResourceLocalizedWhileRunningTransition
>       extends ContainerTransition {
> ...
>           String linkFile = new Path(container.workDir, link).toString();
> ...
> {code}
> {code}
> java.lang.IllegalArgumentException: Can not create a Path from a null string
>         at org.apache.hadoop.fs.Path.checkPathArg(Path.java:159)
>         at org.apache.hadoop.fs.Path.<init>(Path.java:175)
>         at org.apache.hadoop.fs.Path.<init>(Path.java:110)
> ... ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org