Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-635

IllegalArgumentException is thrown if mapred local dir is not writable.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • examples
    • ygridqa

    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

          Activity

            People

              Unassigned Unassigned
              sumanshg Suman Sehgal
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: