Skip to content

Instantly share code, notes, and snippets.

@SergeyAxenov
Created March 16, 2017 01:35
Show Gist options
  • Save SergeyAxenov/78ee661c75e934b19ec7dad69480179d to your computer and use it in GitHub Desktop.
Save SergeyAxenov/78ee661c75e934b19ec7dad69480179d to your computer and use it in GitHub Desktop.
Zeppelin 0.6.2 Use GUI params to save arbitrary paragraph data between the interpreter restarts
// Shows how to persist paragraph data between spark interpreter restarts using Zeppelin GUI params storage
// Run it once, then restart interpreter and run again. Parameter "ax4_gui_param" shuld be restored
val ctx = z.getInterpreterContext
val param = ctx.getGui.getParams().get("ax4_gui_param")
if (param == null) {
s"Parameter is not persisted. Setting initial value"
ctx.getGui.getParams().put("ax4_gui_param","hello_gui_param")
} else {
s"Parameter is restored from Zeppelin GUI params collection: $param"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment