Map Reduce
flyatcmu
这个作者很懒,什么都没留下…
展开
-
Google Suggestion ( Map Reduce)
Use MapReduce framework to build a key-value index for Google Suggestion where the key is the prefix of a query and the value is the top 10 searched queries.You don't need go through all queries and...原创 2020-02-10 06:47:28 · 310 阅读 · 0 评论 -
N-Gram (Map Reduce)
Give a number of strings and the number N. Use the Map Reduce method to count all N-Grams and their occurrences. The letter is granular.ExampleExample 1:Input: N = 3doc_1: "abcabc"doc_2: "abc...原创 2020-02-10 05:39:18 · 637 阅读 · 0 评论 -
Sort Integers (Map Reduce)
Sort integers by Map Reduce framework.In the mapper, key is the document id which can be ignored, value is the integers.In the reducer, your can specify what the key / value is (this depends on how...原创 2020-02-10 04:43:43 · 204 阅读 · 0 评论 -
Top K Frequent Words (Map Reduce)
Find top k frequent words with map reduce framework.The mapper's key is the document id, value is the content of the document, words in a document are split by spaces.For reducer, the output shoul...原创 2020-02-10 03:47:58 · 494 阅读 · 0 评论 -
Inverted Index (Map Reduce)
Use map reduce to build inverted index for given documents.思路:/** * Definition of OutputCollector: * class OutputCollector<K, V> { * public void collect(K key, V value); * ...原创 2020-02-09 15:10:24 · 211 阅读 · 0 评论 -
Anagram (Map Reduce)
Use Map Reduce to find anagrams in a given list of words.ExampleExample 1:Input: "lint lint lnit ln"Output: ["lint", "lint", "lnit"] ["ln"]Example 2:Input: "ab ba cab"Output: ["a...原创 2020-02-09 10:09:36 · 226 阅读 · 0 评论 -
Word Count (Map Reduce)
Using map reduce to count word frequency.https://hadoop.apache.org/docs/r1.2.1/mapred_tutorial.html#Example%3A+WordCount+v1.0ExampleExample 1:Input: chunk1: "Google Bye GoodBye Hadoop cod...原创 2020-02-09 10:04:30 · 220 阅读 · 0 评论