New Contributor
Posts: 6
Registered: ‎03-18-2014
Accepted Solution

Moving to Yarn from Mapreduce-0.20


   I am using cloudera 4.4.0 VM. I am planing to move from mapreduce 0.20 to Yarn.I have done the following.


1. Stopped Mapreduce service

2. start yarn service

3. sudo alternatives --set hadoop-conf  /etc/hadoop/conf.cloudera.yarn1


With this when i run the example wordcount job


yarn jar  hadoop-mapreduce-examples-2.0.0-cdh4.4.0.jar wordcount /user/cloudera/input/core-site.xml /tmp/out1


The job is submitted but the mappers are always in pending step and never move forward.There are no error in the application manager log.


The output is copied here


[cloudera@localhost hadoop-mapreduce]$ yarn jar hadoop-mapreduce-examples-2.0.0-cdh4.4.0.jar wordcount hdfs://localhost:8020/user/cloudera/input/core-site.xml /tmp/out1
2014-03-18 03:17:36,619 INFO [main] service.AbstractService ( - Service:org.apache.hadoop.yarn.client.YarnClientImpl is inited.
2014-03-18 03:17:37,157 INFO [main] service.AbstractService( -Service:org.apache.hadoop.yarn.client.YarnClientImpl is started.
2014-03-18 03:17:41,504 INFO [main] input.FileInputFormat( - Total input paths to process : 1
2014-03-18 03:17:42,118 INFO [main] mapreduce.JobSubmitter( - number of splits:1
2014-03-18 03:17:42,286 WARN [main] conf.Configuration( - mapred.jar is deprecated.
Instead, use mapreduce.job.jar
2014-03-18 03:17:42,304 WARN [main] conf.Configuration( - mapred.output.value.class is
deprecated. Instead, use mapreduce.job.output.value.class
2014-03-18 03:17:42,316 WARN [main] conf.Configuration( - mapreduce.combine.class is
deprecated. Instead, use mapreduce.job.combine.class
2014-03-18 03:17:42,322 WARN [main] conf.Configuration( - is
deprecated. Instead, use
2014-03-18 03:17:42,327 WARN [main] conf.Configuration( - is
deprecated. Instead, use
2014-03-18 03:17:42,329 WARN [main] conf.Configuration( - mapreduce.reduce.class is
deprecated. Instead, use mapreduce.job.reduce.class
2014-03-18 03:17:42,334 WARN [main] conf.Configuration( - mapred.input.dir is
deprecated. Instead, use mapreduce.input.fileinputformat.inputdir
2014-03-18 03:17:42,334 WARN [main] conf.Configuration( - mapred.output.dir is
deprecated. Instead, use mapreduce.output.fileoutputformat.outputdir
2014-03-18 03:17:42,339 WARN [main] conf.Configuration( - is
deprecated. Instead, use mapreduce.job.maps
2014-03-18 03:17:42,346 WARN [main] conf.Configuration( - mapred.output.key.class is
deprecated. Instead, use mapreduce.job.output.key.class
2014-03-18 03:17:42,352 WARN [main] conf.Configuration( - mapred.working.dir is
deprecated. Instead, use mapreduce.job.working.dir
2014-03-18 03:17:45,166 INFO [main] mapreduce.JobSubmitter( - Submitting tokens for job:
2014-03-18 03:17:50,030 INFO [main] client.YarnClientImpl( - Submitted application
application_1395137802361_0001 to ResourceManager at
2014-03-18 03:17:51,237 INFO [main] mapreduce.Job ( -The url to track the job:
2014-03-18 03:17:51,259 INFO [main] mapreduce.Job( - Running job: job_1395137802361_0001
2014-03-18 03:18:19,971 INFO [main] mapreduce.Job( - Job job_1395137802361_0001 running in
uber mode : false
2014-03-18 03:18:19,999 INFO [main] mapreduce.Job( - map 0% reduce 0%


This is where it gets stuck.






Posts: 1,903
Kudos: 435
Solutions: 307
Registered: ‎07-31-2013

Re: Moving to Yarn from Mapreduce-0.20

This may happen if your YARN service is misconfigured w.r.t. memory resources. An MR job requires 1.5g for its AppMaster, and subsequently 1g for each task. Therefore, NodeManagers should be publishing at least 2.5g or 3g for MR jobs to run.

Can you ensure your value in CM -> YARN -> Configuration, for field
"yarn.nodemanager.resource.memory-mb" is set to at least 3 GB or higher? If it isn't, please set it appropriately as per your machine's ability, and restart the YARN service and retry the job submission.

You can also alternatively reduce the default memory demands via client-side properties (for the MR AppMaster) and set of (for the Tasks). These properties accept integer values in MB units.
New Contributor
Posts: 6
Registered: ‎03-18-2014

Re: Moving to Yarn from Mapreduce-0.20

Thanks for your prompt reply