[
https://issues.apache.org/jira/browse/HADOOP-2344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555497#action_12555497
]
Amar Kamat commented on HADOOP-2344:
------------------------------------
The way the Exception message is composed should be changed. Basically its
composed of
- Error stream output
- Exit code error message
So
{code}
exitCode = process.waitFor();
if (exitCode != 0) {
if (errMsg.length() == 0) {
errMsg.append("Command exit with status code " + exitCode);
}
throw new IOException(errMsg.toString());
}
completed = true;
{code}
should be changed to
{code}
exitCode = process.waitFor();
if (exitCode != 0) {
if (errMsg.length() == 0) {
errMsg.insert(0,"Command exit with status code " + exitCode + ",\n");
}
throw new IOException(errMsg.toString());
}
completed = true;
{code}
> Free up the buffers (input and error) while executing a shell command before
> waiting for it to finish.
> ------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-2344
> URL: https://issues.apache.org/jira/browse/HADOOP-2344
> Project: Hadoop
> Issue Type: Bug
> Affects Versions: 0.16.0
> Reporter: Amar Kamat
> Assignee: Amar Kamat
> Fix For: 0.16.0
>
> Attachments: HADOOP-2231.patch, HADOOP-2344.patch, HADOOP-2344.patch,
> HADOOP-2344.patch, HADOOP-2344.patch, HADOOP-2344.patch, HADOOP-2344.patch
>
>
> Process.waitFor() should be invoked after freeing up the input and error
> stream. While fixing https://issues.apache.org/jira/browse/HADOOP-2231 we
> found that this might be a possible cause.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.