Skip to content

Commit

Permalink
add clean in the run_hadoop_mapreduce.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ruitianzhong committed Jun 20, 2024
1 parent 443d6c4 commit 356e304
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions map-reduce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,9 @@ set the variable in `.bashrc`
```shell
export PDSH_RCMD_TYPE=ssh
```


```shell
./run_hadoop_mapreduce.sh clean # clean the output
./run_ha
```
12 changes: 10 additions & 2 deletions map-reduce/run_hadoop_mapreduce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ then
echo "Need 1 argument; exit;"
exit 1
fi
mvn clean
mvn package
avg_by_class_output_dir="avg_by_class_output"
avg_by_student_output_dir="avg_by_student_output"
relation_output_dir="relation_output"

if [ "$1" = "clean" ]
then
echo "rm output file"
rm -rf "${relation_output_dir}" "${avg_by_class_output_dir}" "${avg_by_student_output_dir}"
exit 0
fi
mvn clean
mvn package

JAR_PATH="target/map-reduce-1.0-SNAPSHOT.jar"
DATA_PREFIX="test_data"

Expand Down

0 comments on commit 356e304

Please sign in to comment.