-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (26 loc) · 812 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
WCOUT=wc_out
WCTMP=wc_tmp
INPUTPATH=ex_data/wc
KVAL=10
NVAL=2
WordCount: WordCount.jar
hdfs dfs -rm -r -f $(WCOUT)
hadoop jar $< $(basename $<) $(INPUTPATH) $(WCOUT)
MaxWordCount: MaxWordCount.jar
hdfs dfs -rm -r -f $(WCOUT) $(WCTMP)
hadoop jar $< $(basename $<) $(INPUTPATH) $(WCTMP) $(WCOUT)
TopKWordCount: TopKWordCount.jar
hdfs dfs -rm -r -f $(WCOUT) $(WCTMP)
hadoop jar $< $(basename $<) $(INPUTPATH) $(WCTMP) $(WCOUT) $(KVAL)
NGram: NGram.jar
hdfs dfs -rm -r -f $(WCOUT)
hadoop jar $< $(basename $<) $(INPUTPATH) $(WCOUT) $(NVAL)
WordCount2: WordCount2.jar
hdfs dfs -rm -r -f $(WCOUT)
hadoop jar $< $(basename $<) $(INPUTPATH) $(WCOUT)
%.jar: %.java
hadoop com.sun.tools.javac.Main $<
jar cf $@ $(basename $<)*.class
clean:
rm -f *.class *.jar
hdfs dfs -rm -r -f $(WCOUT) $(WCTMP)