Skip to main content

Helper to connect to CERN's Spark Clusters

Project description

SparkMonitor

Prerequisites

Build from Source

Building the extension involves three parts:

  1. Bundle and minify the JavaScript
  2. Compile the Scala listener into a JAR file.
  3. Package and install the python package.
git clone https://github.com/swan-cern/jupyter-extensions
cd SparkMonitor

and then

#Build Javascript
yarn install
yarn run webpack
#Build SparkListener Scala jar
cd scalalistener/
sbt package

or

make

Install

  1. Install the python package. The python package contains the JavaScript resources and the listener jar file.
pip install .
  1. The frontend extension is symlinked (--symlink) into the jupyter configuration directory by jupyter nbextension command. The second line configures the frontend extension to load on notebook startup.
jupyter nbextension install --py sparkmonitor --user --symlink
jupyter nbextension enable sparkmonitor --user --py
  1. Configure the server extension to load when the notebook server starts
 jupyter serverextension enable --py --user sparkmonitor
  1. Create the default profile configuration files (Skip if config file already exists)
ipython profile create
  1. Configure the kernel to load the extension on startup. This is added to the configuration files in users home directory
echo "c.InteractiveShellApp.extensions.append('sparkmonitor.kernelextension')" >>  $(ipython profile locate default)/ipython_kernel_config.py

Configuration

By default the Spark Web UI runs on localhost:4040. If this is not the case, setting the environment variable SPARKMONITOR_UI_HOST and SPARKMONITOR_UI_PORT overrides the default Spark UI hostname localhost and port 4040 used by the Spark UI proxy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sparkmonitor-1.0.0.tar.gz (3.2 MB view hashes)

Uploaded Source

Built Distribution

sparkmonitor-1.0.0-py3-none-any.whl (3.2 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page