Last active
January 2, 2016 06:19
-
-
Save snoremac/8263084 to your computer and use it in GitHub Desktop.
Launch an EMR cluster and run a word count against a small portion of 1 common crawl segment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Launch a cluster and run the word count against a small portion of | |
# 1 crawl segment. | |
# | |
# The input data is read directly from S3. | |
# | |
# Here I've omitted the --alive argument, so the cluster will self-terminate | |
# once the job is complete. | |
elastic-mapreduce \ | |
--create \ | |
--name "Common Crawl word count" \ | |
--enable-debugging \ | |
--stream \ | |
--ami-version latest \ | |
--instance-type m1.large \ | |
--input s3://aws-publicdatasets/common-crawl/parse-output/segment/1346823845675/textData-03894 \ | |
--output s3n://emr-examples.dius.com.au/output \ | |
--mapper 's3://emr-examples.dius.com.au/ruby/common_crawl_mapper.rb hello,world' \ | |
--reducer s3://emr-examples.dius.com.au/ruby/common_crawl_reducer.rb \ | |
--arg -inputformat --arg org.apache.hadoop.mapred.SequenceFileAsTextInputFormat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment