I'm using IntelliJ and Scala to program a Spark job.
I have an object. When I run it on the local machine I get an error about Java Heap size. I go into IntelliJ settings and I am able to add more space.
I have since spun up a Spark 2.2 cluster on Azure.
When I submit the job to Azure via IntelliJ, I get two errors that aren't there when running it locally
1
YARN Diagnostics: User class threw exception: java.lang.OutOfMemoryError: Java heap space
How do I set the Java heap space on Spark sitting on Azure?
2
YARN Diagnostics: User class threw exception: java.lang.NoClassDefFoundError:
org/apache/commons/mail/DefaultAuthenticator
I believe the issue is at this line of code:
val email = new SimpleEmail
email.setHostName("smtp.googlemail.com")
email.setSmtpPort(465)
email.setAuthenticator(new DefaultAuthenticator("MY EMAIL Address", "MyPassword"))
How do I send an email from Spark on Azure? This code works fine locally. What do I need to do to get this working?