Issue Details (XML | Word | Printable)

Key: HADOOP-5828
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Hemanth Yamijala
Reporter: Hemanth Yamijala
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

Use absolute path for JobTracker's mapred.local.dir in MiniMRCluster

Created: 14/May/09 05:30 AM   Updated: 15/May/09 09:46 AM
Return to search
Component/s: test
Affects Version/s: None
Fix Version/s: 0.20.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works HADOOP-5828.20.patch 2009-05-15 09:28 AM Hemanth Yamijala 0.7 kB
Text File Licensed for inclusion in ASF works HADOOP-5828.patch 2009-05-14 05:47 AM Hemanth Yamijala 0.8 kB

Hadoop Flags: Reviewed
Resolution Date: 15/May/09 09:46 AM


 Description  « Hide
MiniMRCluster's JobTracker sets the mapred.local.dir to a relative path: "build/test/mapred/local". While currently this does not cause any problem, if at some time in future, the JobTracker starts using LocalDirAllocator for localizing files, this could cause failures in contrib tests. This issue was faced when working with an internal patch that tried to introduce LocalDirAllocator into the JobTracker, and capacity scheduler test cases started failing.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Hemanth Yamijala added a comment - 14/May/09 05:39 AM
The failure was in DiskChecker.checkDir(), which called File.isDirectory() on the relative mapred.local.dir path. Debugging this, we found the issue to be one documented in http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4483097. When relative paths are passed to java.io.* APIs, some of them resolve them to absolute paths by prepending the path with the value of the system property user.dir. Some of them resolve them relative to the current working directory.

For contrib tests, we set the user.dir to a value that will typically be different from the current working directory. This triggers inconsistencies in the resolution to absolute files and causes APIs like File.isDirectory() to fail.

The recommendation from Sun is to use absolute rather than relative paths for such cases. Hence, the issue.


Hemanth Yamijala added a comment - 14/May/09 05:47 AM
This patch converts the relative path for the mapred.local.dir in MiniMRCluster to an absolute path.

Sreekanth Ramakrishnan added a comment - 14/May/09 05:57 AM
+1 to the patch. The changes looks fine.

Hemanth Yamijala added a comment - 14/May/09 08:45 AM
Results of test-patch:

[exec] +1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] +1 tests included. The patch appears to include 5 new or modified tests.
[exec]
[exec] +1 javadoc. The javadoc tool did not generate any warning messages.
[exec]
[exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
[exec]
[exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
[exec]
[exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
[exec]


Hemanth Yamijala added a comment - 14/May/09 03:31 PM
Running through Hudson.

Hemanth Yamijala added a comment - 15/May/09 09:02 AM
I ran tests locally. Got some failures, (like in streaming), but those tests are failing on trunk as well. Guess this is good to go.

Hemanth Yamijala added a comment - 15/May/09 09:28 AM
Patch for branch 0.20. Just changes the test directory structure.

Hemanth Yamijala added a comment - 15/May/09 09:46 AM
I just committed this to trunk and branch 0.20.