Description
If specified mapred local directory doesn't have write permission or is non-existent then "IllegalArgumentException" is thrown. Following error message was displayed while running a sleep job with non-writable mapred local directory specified in mapred-site.xml.
sleep job command : $hadoop_home/bin/hadoop jar hadoop-examples.jar sleep -m 100 -r 10
2009-05-12 05:36:46,491 INFO org.apache.hadoop.mapred.TaskInProgress: Error from attempt_200905120525_0001_m_000000_0: java.lang.IllegalArgumentException: n must be positive
at java.util.Random.nextInt(Random.java:250)
at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.confChanged(LocalDirAllocator.java:243)
at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.getLocalPathForWrite(LocalDirAllocator.java:289)
at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:124)
at org.apache.hadoop.mapred.MapOutputFile.getSpillFileForWrite(MapOutputFile.java:107)
at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.sortAndSpill(MapTask.java:1115)
at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.flush(MapTask.java:1028)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:357)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
at org.apache.hadoop.mapred.Child.main(Child.java:170)
This error message(i.e. IllegalArgumentException) ,somehow, doesn't clearly indicate that problem is with mapred local directory. Error message should be more specific in this case.
Attachments
Issue Links
- is duplicated by
-
HADOOP-6766 Spill can fail with bad call to Random
- Resolved
- is related to
-
HADOOP-8437 getLocalPathForWrite should throw IOException for invalid paths
- Resolved