Skip to content

Instantly share code, notes, and snippets.

@ottomata
Created November 14, 2018 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ottomata/7651d0f008aa18dcd948ef3636424b23 to your computer and use it in GitHub Desktop.
Save ottomata/7651d0f008aa18dcd948ef3636424b23 to your computer and use it in GitHub Desktop.
# on stat1007:
export PYSPARK_DRIVER_PYTHON=jupyter
export PYSPARK_DRIVER_PYTHON_OPTS="notebook --port 8123 --ip='localhost' --no-browser"
pyspark2 --master yarn --executor-memory 8G --executor-cores 2 --driver-memory 8G --conf spark.driver.maxResultSize=8G
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
[I 20:31:13.066 NotebookApp] Serving notebooks from local directory: /srv/home/bmansurov
[I 20:31:13.066 NotebookApp] 0 active kernels
[I 20:31:13.066 NotebookApp] The Jupyter Notebook is running at:
[I 20:31:13.066 NotebookApp] http://localhost:8123/?token=306e5151ddea927b0d2acbee8bac4158f685cfd961a8e23d
[I 20:31:13.066 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 20:31:13.066 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8123/?token=306e5151ddea927b0d2acbee8bac4158f685cfd961a8e23d&token=306e5151ddea927b0d2acbee8bac4158f685cfd961a8e23d
# on local laptop:
ssh -v -i ~/.ssh/wikimedia_prod_new -N stat1007.eqiad.wmnet -L 8123:localhost:8123
# Then navigated to URL from ^^, and I had access to a Notebook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment