Skip to content

Commit df07aa7

Browse files
committed
[SPARK-49402][PYTHON][FOLLOW-UP] Manually load ~/.profile in Spark Connect notebook
This is a followup of #47883 that adds manual `source ~/.profile`. Ever since we switched to `Dockerfile`, none of `./profile`, `/.bashrc`, `./bash_profile`, etc seems working. There are a couple of related issues in Jupyter but I cannot figure it out. This is the only cell it needs the environment variable so decided to simply work around. No. Manually tested. No. Closes #47902 from HyukjinKwon/SPARK-49402-followup. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]> (cherry picked from commit 1c9cde5) Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent a20bcec commit df07aa7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/docs/source/getting_started/quickstart_connect.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
"metadata": {},
2929
"outputs": [],
3030
"source": [
31-
"!$HOME/sbin/start-connect-server.sh --packages org.apache.spark:spark-connect_2.12:$SPARK_VERSION"
31+
"%%bash\n",
32+
"source ~/.profile # Make sure environment variables are loaded.\n",
33+
"$HOME/sbin/start-connect-server.sh --packages org.apache.spark:spark-connect_2.12:$SPARK_VERSION"
3234
]
3335
},
3436
{

0 commit comments

Comments
 (0)