]> git.somenet.org - pub/jan/adbs.git/blob - ex2/mapreduce/build_run.sh
ex2.1b done.
[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 hdfs dfs -rm -r -f -skipTrash output-dir .staging .Trash
9
10 hadoop com.sun.tools.javac.Main "SomeMapReduce$RUN_PARAM.java" TextPair.java CSVSplitter.java
11 jar cf "SomeMapReduce$RUN_PARAM.jar" *.class
12 hadoop jar "SomeMapReduce$RUN_PARAM.jar" "SomeMapReduce$RUN_PARAM" output-dir $@
13
14 hdfs dfs -copyToLocal output-dir output-dir
15 hdfs dfs -rm -r -f -skipTrash output-dir .staging .Trash