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
pattern.
hadoop jar \
/usr/hdp/2.6.5.O-292/hadoop-mapreduce/hadoop-mapreduce-examples.jar\
wordcount\
/ public/ randomtextwriter/part-m-0000* \
/user/traininq/wordcount