Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Last active December 24, 2018 22:44
Show Gist options
  • Save dgadiraju/85c9d016bca952d4b1d5d52a828bff2f to your computer and use it in GitHub Desktop.
Save dgadiraju/85c9d016bca952d4b1d5d52a828bff2f to your computer and use it in GitHub Desktop.
#Delete directory if it already exists
hadoop fs -rm -R /user/itversity/wordcount-part-m-00000
#With Packages
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar \
wordcount \
-Dmapreduce.job.reduces=8 \
/user/itversity/randomtextwriter/part-m-00000 \
/user/itversity/wordcount-part-m-00000
#With Parcels
hadoop jar /opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar \
wordcount \
-Dmapreduce.job.reduces=8 \
/user/itversity/randomtextwriter/part-m-00000 \
/user/itversity/wordcount-part-m-00000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment