Zeppelin and Spark Library Dependency

ZeppelinandSparkLibraryDependency

Iamusingthethirdwaytoaddthedependencyasfollowinsparkinterpreter

%spark.dep

z.load("com.sun.mail:javax.mail:1.6.2")

ButIfoundthatisalwaysused,andeverytimeitwillsaythat

“MustbeusedbeforeSparkInterpreter(%spark)initialized

Hint:putthisparagraphbeforeanySparkcodeandrestartZeppelin/Interpreter”.

ThenItriedthisFirstsolutionfromhere

https://zeppelin.apache.org/docs/latest/usage/interpreter/dependency_management.html

Click‘Interpreter’menuinnavigationbar.Find’Spark’inmycaseandclickon‘Edit’button.

IntheDependenciestaparea,puttheseasfollow:

artifact:com.sun.mail:javax.mail:1.6.2

Clickon’Save’.Deletethez.load(xxxxxx);andtryagain.

References:

https://zeppelin.apache.org/docs/latest/interpreter/spark.html