Java / MapReduce
sudo mkdir wordcount_classes
hduser@namenode:~/work$ sudo javac -classpath /usr/local/hadoop/hadoop-core-1.1.2.jar -d wordcount_classes WordCount.java
Jar file creation:
sudo jar -cvf wordcount.jar -C wordcount_classes/ .
hduser@namenode:~/work$ hadoop fs -put file01 /user/hduser/wordcount/input
hadoop fs -rmr /user/hduser/wordcount/output
hadoop jar wordcount.jar org.myorg.WordCount /user/hduser/wordcount/input /user/hduser/wordcount/output
No comments:
Post a Comment