Hadoop: Menjalankan MapReduce Job -WordCount

From OnnoWiki
Revision as of 17:21, 9 November 2015 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Sumber: http://wiki.apache.org/hadoop/WordCount

Buat File Data Sederhana

cd ~
touch file01
touch file02
echo "Hello World Bye World" > file01
echo "Hello Hadoop Goodbye Hadoop" > file02


hadoop dfs -ls /usr/joe/wordcount/input/
/usr/joe/wordcount/input/file01
/usr/joe/wordcount/input/file02
hadoop dfs -cat /usr/joe/wordcount/input/file01
Hello World Bye World
hadoop dfs -cat /usr/joe/wordcount/input/file02
Hello Hadoop Goodbye Hadoop 


hadoop jar hadoop-*-examples.jar wordcount [-m <#maps>] [-r <#reducers>] <in-dir> <out-dir> 


hadoop dfs -copyFromLocal <local-dir> <hdfs-dir> 


Referensi