Section 4: 23.Submitting map reduce job using yarn wordcount

Let us understand how we can submit map reduce job using YARN.
On our state-of-the-art-labs, we can search for appropriate hadoop examples jar by using find command.
find /usr/hdp —name"hadoopexamples*jar"
Pick up the latest version and use as part of the hadoop jar command to submit the job.
• The jar file is runnable jar and we can invoke other programs by passing appropriate arguments
such as wordcount.
• wordcount program takes additional arguments such as input path and output path
• Here we have invoked wordcount with as input
path and then /user/training/wordcount as output.
• It takes care of getting wordcount for each and every word in the 10 files matching the input path

hadoop jar \
/ public/ randomtextwriter/part-m-0000* \

Share this post