Skip to content

Commit

Permalink
Add environment variable for debugging.
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Spörri <[email protected]>
  • Loading branch information
pspoerri committed Sep 11, 2023
1 parent b13becc commit b60175f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/sql/run_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ if (( "${USE_PROFILER}" == 1 )); then
EXECUTOR_JAVA_OPTIONS="${EXECUTOR_JAVA_OPTIONS} -javaagent:/opt/spark/jars/jvm-profiler-1.0.0.jar=${PROFILER_CONFIG}"
fi

JAVA_DEBUG=${JAVA_DEBUG:-0}
if (( "${JAVA_DEBUG}" == 1 )); then
DRIVER_JAVA_OPTIONS="${DRIVER_JAVA_OPTIONS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
EXECUTOR_JAVA_OPTIONS="${EXECUTOR_JAVA_OPTIONS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
fi

${SPARK_HOME}/bin/spark-submit \
--master k8s://$KUBERNETES_SERVER \
--deploy-mode cluster \
Expand Down
6 changes: 6 additions & 0 deletions examples/terasort/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ if (( "${USE_PROFILER}" == 1 )); then
EXECUTOR_JAVA_OPTIONS="${EXECUTOR_JAVA_OPTIONS} -javaagent:/opt/spark/jars/jvm-profiler-1.0.0.jar=${PROFILER_CONFIG}"
fi

JAVA_DEBUG=${JAVA_DEBUG:-0}
if (( "${JAVA_DEBUG}" == 1 )); then
DRIVER_JAVA_OPTIONS="${DRIVER_JAVA_OPTIONS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
EXECUTOR_JAVA_OPTIONS="${EXECUTOR_JAVA_OPTIONS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
fi

${SPARK_HOME}/bin/spark-submit \
--master k8s://$KUBERNETES_SERVER \
--deploy-mode cluster \
Expand Down

0 comments on commit b60175f

Please sign in to comment.