Skip to content

Commit

Permalink
Change jar name to job.jar, update benchmark to show logs of failed a…
Browse files Browse the repository at this point in the history
…nd successful containers
  • Loading branch information
pflooky committed Jun 28, 2024
1 parent 412156c commit cfa9bc2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM datacatering/data-caterer-basic:0.11.2

COPY --chown=app:app build/libs/data-caterer-example-0.1.0.jar /opt/spark/jars/data-caterer.jar
COPY --chown=app:app build/libs/data-caterer-example-0.1.0.jar /opt/app/job.jar
14 changes: 8 additions & 6 deletions benchmark/run_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ run_docker() {

time_taken=$({
time -p docker run -p 4040:4040 \
-v "$(pwd)/build/libs/data-caterer-example-0.1.0.jar:/opt/spark/jars/data-caterer.jar" \
-v "$(pwd)/benchmark/jars/blaze.jar:/opt/spark/jars/blaze.jar" \
-v "$(pwd)/benchmark/jars/comet.jar:/opt/spark/jars/comet.jar" \
-v "$(pwd)/benchmark/jars/gluten.jar:/opt/spark/jars/gluten.jar" \
-v "$(pwd)/build/libs/data-caterer-example-0.1.0.jar:/opt/app/job.jar" \
-v "$(pwd)/benchmark/jars/blaze.jar:/opt/app/jars/blaze.jar" \
-v "$(pwd)/benchmark/jars/comet.jar:/opt/app/jars/comet.jar" \
-v "$(pwd)/benchmark/jars/gluten.jar:/opt/app/jars/gluten.jar" \
-v "/tmp:/opt/app/data" \
-e "PLAN_CLASS=$1" \
-e "RECORD_COUNT=$2" \
Expand Down Expand Up @@ -112,8 +112,10 @@ if [[ "$enable_data_sink_run" == true ]]; then
done
fi

echo "Printing logs of failed docker runs"
docker ps -a | grep -v "Exited (0)" | awk -F " " '{print $1}' | xargs docker logs
echo "Printing logs of last failed docker run"
docker ps -a | grep -v "Exited (0)" | awk -F " " '{print $1}' | tail -1 | xargs docker logs
echo "Printing logs of last docker run"
docker ps -a | awk -F " " '{print $1}' | tail -1 | xargs docker logs

echo "Printing benchmark results"
cat "$benchmark_result_file"
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ docker network create --driver bridge docker_default || true
echo "Running Data Caterer via docker, version: $data_caterer_version"
DOCKER_CMD=(
docker run -p 4040:4040
-v "$(pwd)/build/libs/data-caterer-example-0.1.0.jar:/opt/spark/jars/data-caterer.jar"
-v "$(pwd)/build/libs/data-caterer-example-0.1.0.jar:/opt/app/job.jar"
-v "$(pwd)/docker/sample:/opt/app/data"
-v "$(pwd)/docker/sample/tracking:/opt/app/record-tracking"
-v "$(pwd)/docker/mount:/opt/app/mount"
Expand Down

0 comments on commit cfa9bc2

Please sign in to comment.