Java – Error reading/writing (Hadoop)

Error reading/writing (Hadoop)… here is a solution to the problem.

Error reading/writing (Hadoop)

I followed this Hadoop installation tutorial. Well, if I use \usr\local\hadoop as hadoop.tmp.dir, everything works fine. Because I have little space in this partition, I tried setting this value to /NEW_partition/(ext4) but I always get some java errors. I’m guessing this is because hadoop can’t write to that partition. How can I make it work?

::::Edit::::
Full execution results.

hadoop@FreeLnx:/usr/local/hadoop-0.20.203.0$ bin/hadoop jar hadoop-examples-0.20.203.0.jar wordcount /MY_STORAGE/tmp1/gutnb /MY_STORAGE/tmp1/gutnbou

12/02/12 02:56:00 INFO input. FileInputFormat: Total input paths to process : 3

12/02/12 02:56:00 INFO mapred. JobClient: Running job: job_201202120255_0001

12/02/12 02:56:01 INFO mapred. JobClient:  map 0% reduce 0%

12/02/12 02:56:09 INFO mapred. JobClient: Task Id : attempt_201202120255_0001_m_000004_0, Status : FAILED

java.lang.Throwable: Child Error
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:271)

Caused by: java.io.IOException: Task process exit with nonzero status of 126.
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:258)

12/02/12 02:56:09 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000004_0&filter=stdout

12/02/12 02:56:09 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000004_0&filter=stderr

12/02/12 02:56:15 INFO mapred. JobClient: Task Id : attempt_201202120255_0001_m_000004_1, Status : FAILED

java.lang.Throwable: Child Error
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:271)

Caused by: java.io.IOException: Task process exit with nonzero status of 126.
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:258)

12/02/12 02:56:15 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000004_1&filter=stdout

12/02/12 02:56:15 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000004_1&filter=stderr

12/02/12 02:56:21 INFO mapred. JobClient: Task Id : attempt_201202120255_0001_m_000004_2, Status : FAILED

java.lang.Throwable: Child Error
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:271)

Caused by: java.io.IOException: Task process exit with nonzero status of 126.
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:258)

12/02/12 02:56:21 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000004_2&filter=stdout

12/02/12 02:56:21 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000004_2&filter=stderr

12/02/12 02:56:33 INFO mapred. JobClient: Task Id : attempt_201202120255_0001_m_000003_0, Status : FAILED

java.lang.Throwable: Child Error
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:271)

Caused by: java.io.IOException: Task process exit with nonzero status of 126.
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:258)

12/02/12 02:56:33 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000003_0&filter=stdout

12/02/12 02:56:33 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000003_0&filter=stderr

12/02/12 02:56:39 INFO mapred. JobClient: Task Id : attempt_201202120255_0001_m_000003_1, Status : FAILED

java.lang.Throwable: Child Error
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:271)

Caused by: java.io.IOException: Task process exit with nonzero status of 126.
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:258)

12/02/12 02:56:39 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000003_1&filter=stdout

12/02/12 02:56:39 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000003_1&filter=stderr

12/02/12 02:56:45 INFO mapred. JobClient: Task Id : attempt_201202120255_0001_m_000003_2, Status : FAILED

java.lang.Throwable: Child Error
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:271)

Caused by: java.io.IOException: Task process exit with nonzero status of 126.
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:258)

12/02/12 02:56:45 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000003_2&filter=stdout

12/02/12 02:56:45 WARN mapred. JobClient: Error reading task outputhttp://FreeLnx:50060/tasklog?plaintext=true&attemptid=attempt_201202120255_0001_m_000003_2&filter=stderr

12/02/12 02:56:51 INFO mapred. JobClient: Job complete: job_201202120255_0001

12/02/12 02:56:51 INFO mapred. JobClient: Counters: 4

12/02/12 02:56:51 INFO mapred. JobClient:   Job Counters 

12/02/12 02:56:51 INFO mapred. JobClient:     SLOTS_MILLIS_MAPS=24115

12/02/12 02:56:51 INFO mapred. JobClient:     Total time spent by all reduces waiting after reserving slots (ms)=0

12/02/12 02:56:51 INFO mapred. JobClient:     Total time spent by all maps waiting after reserving slots (ms)=0

12/02/12 02:56:51 INFO mapred. JobClient:     SLOTS_MILLIS_REDUCES=0

Solution

You may need to check the permissions of the configured mapred.local.dir directory, the default directory is ${hadoop.tmp.dir}/mapred/local. The parent directory and everything must be owned by the user running the TaskTracker daemon for the task to effectively write transient data (and perform other actions) to it.

Related Problems and Solutions