forked from enmwmak/GMM-on-Hadoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_WordCount.sh
executable file
·21 lines (13 loc) · 1.02 KB
/
run_WordCount.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -ex
# Run jobs on Hadoop cluster
# Run this script on enmcomp7 (the host that run ResourceManager)
cd $HADOOP_PREFIX/Workspace/MapReduce/matlab
./split_file.pl sales_figure.txt 32
cd $HADOOP_PREFIX/Workspace/MapReduce
jar cvf lib/parallel.jar -C bin/ .
$HADOOP_PREFIX/bin/hdfs dfs -mkdir -p /user/mwmak/stats/input
$HADOOP_PREFIX/bin/hdfs dfs -rm -r /user/mwmak/stats/input
$HADOOP_PREFIX/bin/hdfs dfs -put $HADOOP_PREFIX/Workspace/MapReduce/matlab/input /user/mwmak/stats
sleep 1
#$HADOOP_PREFIX/bin/hdfs dfs -rm -r -f /user/mwmak/stats/output; sleep 1; cd $HADOOP_PREFIX/Workspace/MapReduce/bin; time $HADOOP_PREFIX/bin/hadoop jar ../lib/parallel.jar parallel.wordcount.WordCount /user/mwmak/stats/input /user/mwmak/stats/output; cd $HADOOP_PREFIX
$HADOOP_PREFIX/bin/hdfs dfs -rm -r -f /user/mwmak/stats/output; sleep 1; cd $HADOOP_PREFIX/Workspace/MapReduce/bin; time $HADOOP_PREFIX/bin/hadoop jar ../lib/parallel.jar parallel.wordcount.WordCountInMapperComb /user/mwmak/stats/input /user/mwmak/stats/output; cd $HADOOP_PREFIX