I tried to run the aggregatewordcount example found in the jar sample application file. Despite the fact that the program worked successfully, the result was not what I expected. The output file has only one line, which looks like this:
record_count 9
where 9 is the number of lines in the input file that I gave as input to the program. It is assumed that the program should indicate the number of words of each unique word in the input file. I executed the program with the following command:
hadoop jar hadoop-mapreduce-examples-2.2.0.jar aggregatewordcount input_dir output_dir 1 textinputformat
I am using hasoop 2.2.0. What to do to make the program work correctly?
source
share