File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
hadoop-ozone/dist/src/main/compose Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,14 @@ RESULT_DIR=${RESULT_DIR:-"$COMPOSE_DIR/result"}
2222RESULT_DIR_INSIDE=" /tmp/smoketest/$( basename " $COMPOSE_ENV_NAME " ) /result"
2323SMOKETEST_DIR_INSIDE=" ${OZONE_DIR:-/ opt/ hadoop} /smoketest"
2424
25- # delete previous results
26- rm -rf " $RESULT_DIR "
27- mkdir -p " $RESULT_DIR "
28- # Should be writeable from the docker containers where user is different.
29- chmod ogu+w " $RESULT_DIR "
25+ # # @description create results directory, purging any prior data
26+ create_results_dir () {
27+ # delete previous results
28+ rm -rf " $RESULT_DIR "
29+ mkdir -p " $RESULT_DIR "
30+ # Should be writeable from the docker containers where user is different.
31+ chmod ogu+w " $RESULT_DIR "
32+ }
3033
3134# # @description print the number of datanodes up
3235# # @param the docker-compose file
@@ -81,6 +84,8 @@ wait_for_datanodes(){
8184start_docker_env (){
8285 local -i datanode_count=${1:- 3}
8386
87+ create_results_dir
88+
8489 docker-compose -f " $COMPOSE_FILE " down
8590 docker-compose -f " $COMPOSE_FILE " up -d --scale datanode=" ${datanode_count} " \
8691 && wait_for_datanodes " $COMPOSE_FILE " " ${datanode_count} " \
You can’t perform that action at this time.
0 commit comments