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

Bingxue Qiu commented on YARN-6645:
-----------------------------------

hi, [~cheersyang], we backport the YARN-1503 to hadoop 2.8 in our clusters. for 
this exception, we create the nmPrivateDir in writeScriptToNMPrivateDir method 
like this, please feel free to give me some suggestion, Thank you!

 private File writeScriptToNMPrivateDir(String nmPrivateDir, String command)
      throws IOException {
    File file = new File(nmPrivateDir);
    if (!file.mkdirs()) {
      if (!file.exists()) {
        LOG.error("Failed to create nmPrivate dir " + file);
      }
    }

    File tmp = File.createTempFile("cmd_", "_tmp", new File(nmPrivateDir));
    Writer writer = new OutputStreamWriter(new FileOutputStream(tmp), "UTF-8");
    PrintWriter printWriter = new PrintWriter(writer);
    printWriter.print(command);
    printWriter.close();
    return tmp;
  }

> Bug fix in ContainerImpl when calling the symLink of LinuxContainerExecutor
> ---------------------------------------------------------------------------
>
>                 Key: YARN-6645
>                 URL: https://issues.apache.org/jira/browse/YARN-6645
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>            Reporter: Bingxue Qiu
>             Fix For: 2.9.0
>
>         Attachments: error when creating symlink.png
>
>
> when creating symlink after the resource localized in our clusters , an 
> IOException has been thrown, because the nmPrivateDir doesn't exist. we add a 
> patch to fix it.



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

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

Reply via email to