From 3609f0ff283bd4189dba2189327ecdb738662ba3 Mon Sep 17 00:00:00 2001 From: Jeremy Nicklas Date: Mon, 23 Apr 2018 10:36:55 -0400 Subject: [PATCH] add debug statements --- CHANGELOG.md | 3 +++ template/script.sh.erb | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec00fda..a8fe094 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Added timestamps in output to make debugging easier. + ### Changed - Increased timeout from 60 to 120 seconds. diff --git a/template/script.sh.erb b/template/script.sh.erb index ab3bf51..7ddc171 100755 --- a/template/script.sh.erb +++ b/template/script.sh.erb @@ -23,6 +23,9 @@ # Start Jupyter Notebook server + Spark cluster # +echo "Starting main script..." +echo "TTT - $(date)" + # Clean the environment module purge @@ -88,6 +91,8 @@ else fi sleep 2 +echo "TTT - $(date)" + # Create Spark worker launcher script export SPARK_WORKER_SCRIPT="${PWD}/spark-worker.sh" ( @@ -196,16 +201,22 @@ EOL # Set working directory to notebook root directory cd "${NOTEBOOK_ROOT}" +echo "TTT - $(date)" + # Setup Jupyter Notebook environment module use $MODULEPATH_ROOT/project/ondemand module load jupyter/python3.5 module list +echo "TTT - $(date)" + # List available kernels for debugging purposes set -x jupyter kernelspec list { set +x; } 2>/dev/null +echo "TTT - $(date)" + # Launch Jupyter Notebook interface to Spark set -x jupyter notebook --config="${CONFIG_FILE}"