]> git.somenet.org - pub/jan/adbs.git/blob - ex2/mapreduce/build_run.sh
GITOLITE.txt
[pub/jan/adbs.git] / ex2 / mapreduce / build_run.sh
1 #!/bin/bash
2
3 . /etc/profile
4
5 RUN_PARAM=$1
6 shift 1
7
8 rm -rf output-dir
9 hdfs dfs -rm -r -f -skipTrash output-dir .staging .Trash
10
11 hadoop com.sun.tools.javac.Main "SomeMapReduce$RUN_PARAM.java" TextPair.java CSVSplitter.java
12 jar cf "SomeMapReduce$RUN_PARAM.jar" *.class
13 hadoop jar "SomeMapReduce$RUN_PARAM.jar" "SomeMapReduce$RUN_PARAM" output-dir $@
14
15 hdfs dfs -copyToLocal output-dir output-dir
16 hdfs dfs -rm -r -f -skipTrash output-dir .staging .Trash