HUE-8414 [spark] Change session id in Sample Notebook

Review Request #13169 - Created July 12, 2018 and updated

Ivan Dzikovsky
hue
HUE-8414
hue
Exception that I've found (Session '-1' not found) was raised because sessions with id -1 was not counted as outdated by following regex that not handle negative IDs:
https://github.com/cloudera/hue/blob/93bd199/desktop/libs/notebook/src/notebook/connectors/spark_shell.py#L264

And I've tried to remove that session from Sample Notebook fixture, but after that, Hue tries to start all sessions (for SparkR, PySpark and Scala) on opening of that notebook, which is not necessary.

So the solution is not to remove sessions at all, but to use some non-negative dummy session id, so session would not be started on notebook opening, and at the same time it would be started at attempt to launch any example (instead of getting Session '-1' not found exception).

manual

Loading...