在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:swan-cern/sparkmonitor开源软件地址:https://github.com/swan-cern/sparkmonitor开源编程语言:TypeScript 35.9%开源软件介绍:SparkMonitorAn extension for Jupyter Lab & Jupyter Notebook to monitor Apache Spark (pyspark) from notebooks About
Requirements
Features
Quick StartSetting up the extensionpip install sparkmonitor # install the extension
# set up an ipython profile and add our kernel extension to it
ipython profile create # if it does not exist
echo "c.InteractiveShellApp.extensions.append('sparkmonitor.kernelextension')" >> $(ipython profile locate default)/ipython_kernel_config.py
# For use with jupyter notebook install and enable the nbextension
jupyter nbextension install sparkmonitor --py
jupyter nbextension enable sparkmonitor --py
# The jupyterlab extension is automatically enabled With the extension installed, a from pyspark import SparkContext
# Start the spark context using the SparkConf object named `conf` the extension created in your kernel.
sc=SparkContext.getOrCreate(conf=conf) If you already have your own spark configuration, you will need to set from pyspark.sql import SparkSession
spark = SparkSession.builder\
.config('spark.extraListeners', 'sparkmonitor.listener.JupyterSparkMonitorListener')\
.config('spark.driver.extraClassPath', 'venv/lib/python3.<X>/site-packages/sparkmonitor/listener_<scala_version>.jar')\
.getOrCreate() DevelopmentIf you'd like to develop the extension: # See package.json scripts for building the frontend
yarn run build:<action>
# Install the package in editable mode
pip install -e .
# Symlink jupyterlab extension
jupyter labextension develop --overwrite .
# Watch for frontend changes
yarn run watch
# Build the spark JAR files
sbt +package
History
ChangelogThis repository is published to pypi as sparkmonitor
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论