• 2009: Facebook has 2.5 PB user data + 15 TB/day • 2009: eBay has 6.5 PB user data + 50 TB/day • 2011: Yahoo! has 180-200 PB of data • 2012: Facebook ingests 500 TB/day How big is big data for the big guys? Tuesday, April 23, 13
• What happens when tasks fail? • How do you handle distributed synchronization? • And more.. But parallel processing is super difficult Tuesday, April 23, 13
users to create and run jobs with any executables as the mapper and/or the reducer. • STDIN, STDOUT magic <key><tab><value><newline> Ex: “Hello \t 1 \n” What is Hadoop Streaming? Tuesday, April 23, 13
# remove any newline line = line.chomp line.split(" ").each do |w| # output to STDOUT # <key><tab><value><newline> puts w.downcase + "\t" + 1.to_s end end mapper.rb Tuesday, April 23, 13
key_total = 0 ARGF.each do |line| # remove any newline line = line.chomp # split key and value on tab character (key, value) = line.split(/\t/) # check for new key if prev_key && key != prev_key && key_total > 0 # output total for previous key # <key><tab><value><newline> puts prev_key + "\t" + key_total.to_s # reset key total for new key prev_key = key key_total = 0 elsif ! prev_key prev_key = key end # add to count for this current key key_total += value.to_i end reducer.rb Tuesday, April 23, 13