Abhishek Kumar
Abhishek Kumar

Reputation: 3366

Map reduce job getting stuck at map 0% reduce 0%

I am running the famous wordcount example. I have a local and prod hadoop setup. The same example is working in prod, but its not working locally. Can someone tell me what should I look for. The job is getting stuck. The task logs are:

~/tmp$ hadoop jar wordcount.jar WordCount /testhistory /outputtest/test
Warning: $HADOOP_HOME is deprecated.

13/08/29 16:12:34 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
13/08/29 16:12:35 INFO input.FileInputFormat: Total input paths to process : 3
13/08/29 16:12:35 INFO util.NativeCodeLoader: Loaded the native-hadoop library
13/08/29 16:12:35 WARN snappy.LoadSnappy: Snappy native library not loaded
13/08/29 16:12:35 INFO mapred.JobClient: Running job: job_201308291153_0015
13/08/29 16:12:36 INFO mapred.JobClient:  map 0% reduce 0%

Locally hadoop in running as pseudo distributed mode. All the 3 processes, namenode, datanode, jobtracker is running. Let me know if some extra information is required.

Upvotes: 5

Views: 15698

Answers (5)

abhiieor
abhiieor

Reputation: 3554

If this problem is coming when using Hive queries then do check if you are joining two very big tables without leveraging partitions. Not using partitions may lead to long running full table scans and hence stuck at map 0% reduce 0%.

Upvotes: 0

GoingMyWay
GoingMyWay

Reputation: 17478

Except for hadoop tasktracker & and any other issues. Please check you code and make sure that there is no infinite loop or any other bugs. Maybe there are some bugs in your code!

Upvotes: 1

mountrix
mountrix

Reputation: 1243

I had the same problem and this page helped me: http://www.alexjf.net/blog/distributed-systems/hadoop-yarn-installation-definitive-guide/

Basically I solved my problem using the following 3 steps. The fact is that I had to configure much more memory I really have.

1) yarn-site.xml

  • yarn.resourcemanager.hostname = hostname_of_the_master
  • yarn.nodemanager.resource.memory-mb = 4000
  • yarn.nodemanager.resource.cpu-vcores = 2
  • yarn.scheduler.minimum-allocation-mb = 4000

2) mapred-site.xml

  • yarn.app.mapreduce.am.resource.mb = 4000
  • yarn.app.mapreduce.am.command-opts = -Xmx3768m
  • mapreduce.map.cpu.vcores = 2
  • mapreduce.reduce.cpu.vcores = 2

3) Send these files across all nodes

Upvotes: 1

nanounanue
nanounanue

Reputation: 8362

In Hadoop 2.x this problem could be related to memory issues, you can see it in MapReduce in Hadoop 2.2.0 not working

Upvotes: 2

user31986
user31986

Reputation: 1656

The tasktracker seems to be missing.

Try:

hadoop tasktracker &

Upvotes: 3

Related Questions