[
https://issues.apache.org/jira/browse/YARN-6550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16110225#comment-16110225
]
Allen Wittenauer commented on YARN-6550:
----------------------------------------
If you group this, you won't have to set it per line. i.e.:
{code}
#!/usr/bin/env bash
STDERR=/tmp/err.log
STDOUT=/tmp/out.log
{
cmd
cmd
cmd
} 2>"${stderr}" | tee -a "${stderr}" > "${stdout}"
{code}
(or whatever) In shell, it's generally not useful to split stderr away from
stdout when debugging. The above should split stdout into a file and
stdout+stderr into another. (I'm doing this on the fly so that might not be
100% correct syntax haha)
It's probably also worth pointing out that several paths will have unexpected
results if they have spaces due to lack of quotes. Probably be a good idea to
run the computed shell script through shellcheck to find errors like that.
(Although it won't catch e.g., -Dyarn.app.container.log.dir=, since that's
hard-set.)
> Capture launch_container.sh logs
> --------------------------------
>
> Key: YARN-6550
> URL: https://issues.apache.org/jira/browse/YARN-6550
> Project: Hadoop YARN
> Issue Type: Sub-task
> Affects Versions: 3.0.0-beta1
> Reporter: Wangda Tan
> Assignee: Suma Shivaprasad
> Fix For: 3.0.0-beta1
>
> Attachments: YARN-6550.002.patch, YARN-6550.patch
>
>
> launch_container.sh which generated by NM will do a bunch of things (like
> create link, etc.) while launch a process. No logs captured until {{exec}} is
> called. We need capture all failures of launch_container.sh for easier
> troubleshooting.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]