Skip to content

Instantly share code, notes, and snippets.

@natbusa
Last active August 29, 2015 13:57
Show Gist options
  • Save natbusa/9651170 to your computer and use it in GitHub Desktop.
Save natbusa/9651170 to your computer and use it in GitHub Desktop.
word count: mapreduce in java
#beam it up to the hdfs
hadoop fs -mkdir wordcount-input/
hadoop fs -copyFromLocal lorem.txt wordcount-input/
# Maven project in https://github.com/natalinobusa/wordcount/hadoop-mapreduce-java
$HADOOP_HOME/bin/hadoop jar target/wordcount-mapreduce-java-1.0-SNAPSHOT.jar \
com.natalinobusa.WordCount wordcount-input wordcount-mapreduce-java-output
$HADOOP_HOME/bin/hadoop fs -cat wordcount-mapreduce-java-output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment