Top K words problem

2014-08-09 Thread Zhige Xin
I have a question about hadoop that how to modify the wordcount program to give the top K words according to their occurrences. The naive method is to count and sort but it needs too many lines of code and is not elegant. Another one uses a data structure, called TreeMap, to solve this problem, wh

Can not find hadoop packages

2014-05-28 Thread Zhige Xin
Hi deal all, I tried to compile my own WordCount.java using the following command: javac -classpath /usr/local/Cellar/hadoop/2.2.0/libexec/share/hadoop/common/hadoop-common-2.2.0:/usr/local/Cellar/hadoop/2.2.0/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.2.0.jar:/usr/local/Cell

Can not find hadoop packages

2014-05-28 Thread Zhige Xin
Hi deal all, I tried to compile my own WordCount.java using the following command: *javac -classpath /usr/local/Cellar/hadoop/2.2.0/libexec/share/hadoop/common/hadoop-common-2.2.0:/usr/local/Cellar/hadoop/2.2.0/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.2.0.jar:/usr/local/Cella