[
https://issues.apache.org/jira/browse/HADOOP-4410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639725#action_12639725
]
Amareshwari Sriramadasu commented on HADOOP-4410:
-------------------------------------------------
HADOOP-4014 changed the api FileUtil.makeShellPath(File) to consider the
CanonicalPath for the File passed. TestMiniMRMapredDebugScript passes
"./testscript" which should be expanded by the bash later. But the new api
resolves the path earlier.
The same problem can occur in streaming, with -mapper/-reducer commands given
as relative path (relative to the working directory), which should be expanded
later by the bash.
One solution is to pass a boolean to the api to consider canonical path or not.
And pass false by default.
Then, the api looks like:
{noformat}
public static String makeShellPath(File file) throws IOException {
return makeShellPath(file, false);
}
public static String makeShellPath(File file, boolean makeCanonicalPath)
throws IOException {
if (makeCanonicalPath) {
return makeShellPath(file.getCanonicalPath());
} else {
return makeShellPath(file.toString());
}
}
{noformat}
Thoughts?
> TestMiniMRDebugScript fails on trunk
> ------------------------------------
>
> Key: HADOOP-4410
> URL: https://issues.apache.org/jira/browse/HADOOP-4410
> Project: Hadoop Core
> Issue Type: Bug
> Components: mapred
> Affects Versions: 0.19.0
> Reporter: Amareshwari Sriramadasu
> Assignee: Amareshwari Sriramadasu
> Priority: Blocker
> Fix For: 0.19.0
>
>
> TestMiniMRDebugScript fails with following assertion error:
> junit.framework.ComparisonFailure: expected:<Test Script
> Bailing out> but was:<bash:
> /zonestorage/hudson/home/hudson/hudson/jobs/Hadoop-Patch/workspace/trunk/testscript:
> No such file or directory
> bash: line 0: exec:
> /zonestorage/hudson/home/hudson/hudson/jobs/Hadoop-Patch/workspace/trunk/testscript:
> cannot execute: No such file or directory>
> at
> org.apache.hadoop.mapred.TestMiniMRMapRedDebugScript.testMapDebugScript(TestMiniMRMapRedDebugScript.java:207)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.