There are multiple samples available one can see running to see the list of samples run:
Command:
yarn jar /usr/hdp/<ver>/hadoop-mapreduce/hadoop-mapreduce-examples-<ver>.jar
O/p:
Valid program names are:
wordcount: A map/reduce program that counts the words in the input files.
wordmean: A map/reduce program that counts the average length of the words in the input files.
wordmedian: A map/reduce program that counts the median length of the words in the input files.
wordstandarddeviation: A map/reduce program that counts the standard deviation of the length of the words in the input files.
To know input for any specific program run for ex wordcount:
Command:
yarn jar /usr/hdp/<ver>/hadoop-mapreduce/hadoop-mapreduce-examples-<ver>.jar wordcount
O/p:
Usage: wordcount <in> [<in>…] <out>
Now, run it passing required arg:
yarn jar /usr/hdp/<ver>/hadoop-mapreduce/hadoop-mapreduce-examples-<ver>.jar wordcount in.txt outFolder