You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by vgmartinez <gi...@git.apache.org> on 2016/05/25 21:50:31 UTC
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
GitHub user vgmartinez opened a pull request:
https://github.com/apache/incubator-zeppelin/pull/918
ZEPPELIN-885 Add option to send email in scheduler execution
### What is this PR for?
Add the option to send email when a note is runing using the scheduler
### What type of PR is it?
Improvement
### Todos
### What is the Jira issue?
* [ZEPPELIN-885] (https://issues.apache.org/jira/browse/ZEPPELIN-885)
### How should this be tested?
Set email in scheduler and add cron expresion to execute note.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vgmartinez/incubator-zeppelin email_option
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-zeppelin/pull/918.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #918
----
commit c4ece06bd0b46e3783556b9da48d989fb3711a1c
Author: Victor Manuel <vi...@gmail.com>
Date: 2016-05-17T17:57:06Z
rebase with master
commit 7076bef98f1d9413bf69524f541a621c4e120233
Author: Victor Manuel <vi...@gmail.com>
Date: 2016-05-17T22:21:24Z
add setting and refactor
commit 8c36e478319bf8167c9805d69cf6afb6da957379
Author: Victor Manuel <vi...@gmail.com>
Date: 2016-05-25T20:30:44Z
remove controller for scheduler
commit 765c6b9d1bff638c47e23f7ab1b12cf8bf30305c
Author: Victor Manuel <vi...@gmail.com>
Date: 2016-05-25T21:31:44Z
fix style and remove duplicate properties
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send email in sc...
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918
Do you mind add new configurations to https://github.com/apache/incubator-zeppelin/blob/master/docs/install/install.md#zeppelin-configuration as well??
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
Posted by cloverhearts <gi...@git.apache.org>.
Github user cloverhearts commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918#issuecomment-221763611
Thank you for good feature.
I like this feature.
but, i got following problem.
Zeppelin Server log.
```
ERROR [2016-05-26 11:27:01,752] ({DefaultQuartzScheduler_Worker-2} Notebook.java[sendEmail]:594) - Error:
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.googlemail.com:465
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1421)
at org.apache.commons.mail.Email.send(Email.java:1448)
at org.apache.zeppelin.notebook.Notebook.sendEmail(Notebook.java:591)
at org.apache.zeppelin.notebook.Notebook$CronJob.execute(Notebook.java:513)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: javax.mail.SendFailedException: Send failure (javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 z12sm1446736pfj.1 - gsmtp
)
at javax.mail.Transport.send(Transport.java:163)
at javax.mail.Transport.send(Transport.java:48)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1411)
... 5 more
Caused by: javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 z12sm1446736pfj.1 - gsmtp
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:892)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:814)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:728)
at javax.mail.Service.connect(Service.java:274)
at javax.mail.Service.connect(Service.java:91)
at javax.mail.Service.connect(Service.java:76)
at javax.mail.Transport.send(Transport.java:94)
... 7 more
ERROR [2016-05-26 11:27:03,392] ({DefaultQuartzScheduler_Worker-2} Notebook.java[sendEmail]:594) - Error:
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.googlemail.com:465
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1421)
at org.apache.commons.mail.Email.send(Email.java:1448)
at org.apache.zeppelin.notebook.Notebook.sendEmail(Notebook.java:591)
at org.apache.zeppelin.notebook.Notebook$CronJob.execute(Notebook.java:539)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: javax.mail.SendFailedException: Send failure (javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 f9sm1425655pfd.56 - gsmtp
)
at javax.mail.Transport.send(Transport.java:163)
at javax.mail.Transport.send(Transport.java:48)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1411)
... 5 more
Caused by: javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 f9sm1425655pfd.56 - gsmtp
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:892)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:814)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:728)
at javax.mail.Service.connect(Service.java:274)
at javax.mail.Service.connect(Service.java:91)
at javax.mail.Service.connect(Service.java:76)
at javax.mail.Transport.send(Transport.java:94)
... 7 more
```
My Environment : Mac OS elcapitan, chrome lastests.
my note context : "println("hellow");
cron time 1m;
email : onStart : myemail@gmail.com
email : onError : myemail@gmail.com
email : onSuccess : myemail@gmail.com
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin issue #918: ZEPPELIN-885 Add option to send email in sche...
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:
https://github.com/apache/incubator-zeppelin/pull/918
@vgmartinez No worries. CI build fails with error
```
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:30 min
[INFO] Finished at: 2016-06-06T22:47:47+00:00
[INFO] Final Memory: 38M/471M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (verify.rat) on project zeppelin-zengine: Too many files with unapproved license: 1 See RAT report in: /home/travis/build/apache/incubator-zeppelin/zeppelin-zengine/target/rat.txt -> [Help 1]
```
Could you take a look?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
Posted by astroshim <gi...@git.apache.org>.
Github user astroshim commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918#issuecomment-221772165
@cloverhearts maybe you need to set up the smtp informations. you can set the variables in the "conf/zeppelin-site.xml".
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send email in sc...
Posted by vgmartinez <gi...@git.apache.org>.
Github user vgmartinez commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918
@bzz @Leemoonsoo thks for review.
@bzz I'm sorry I have not explained well. I've added more description to JIRA/PR
I created a new class for events outside notebook, to use for other types of event notifications. Please take a look.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
Posted by bzz <gi...@git.apache.org>.
Github user bzz commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918#issuecomment-221800802
@vgmartinez Thank you for contribution!
Befor deep dive into the code, I have a question - could you pelase explain the use-case you have in mind for this feature?
I'm trying to understand in particular what is the benefit of introducing complexity of SNTP support in the Zeppelin codebase (not sure that `Notebook.java` is the best place for it either), versus just scheduling a notebook using existing scheduller, that just loads the SNTP library (using %dep) and then sends any template out.
See [#8 from this notebook](https://www.zeppelinhub.com/viewer/notebooks/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL2J6ei96ZXBwZWxpbi1naXRodWItYXJjaGl2ZS9tYXN0ZXIvbm90ZWJvb2svMkFaWjJNSFZHL25vdGUuanNvbg) for an example of the data product, that uses this approach for sending out email notifications.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
Posted by cloverhearts <gi...@git.apache.org>.
Github user cloverhearts commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918#issuecomment-221791051
@astroshim Oh, I see. Thank you!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin issue #918: ZEPPELIN-885 Add option to send email in sche...
Posted by vgmartinez <gi...@git.apache.org>.
Github user vgmartinez commented on the issue:
https://github.com/apache/incubator-zeppelin/pull/918
@Leemoonsoo sorry for delay. I added the configurations in the file install.md and delete the static modifier.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
Posted by vgmartinez <gi...@git.apache.org>.
Github user vgmartinez commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918#issuecomment-221804094
@cloverhearts @astroshim @felixcheung thks, add more info and doc ASAP.
hi @bzz, I think having the option to send an email when you finish executing a note or when an error occurs in one paragraph is a good utility for the user.
e.g if you have cron expression to run every monday is useful to receive an email when it starts, when finished or when there is an error.
what do you think?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
Posted by vgmartinez <gi...@git.apache.org>.
Github user vgmartinez commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918#issuecomment-222380608
Hi @Leemoonsoo, I totally agree with you. I'll think a bit about this topic, if you already have some idea we can debate.
thanks for the suggestion.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918#issuecomment-221789778
cool - should we have the info in documentation?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918#issuecomment-222587470
@vgmartinez I think move email facilities from `Notebook.java` to new class, like @bzz mentioned, would be the first step to generalize it. Doesn't need to generalize everything from the beginning, but i think it worth to show possibilities of implementing more events and more actions. And taking code out from `Notebook.java` will help.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918#issuecomment-222009584
@vgmartinez Thanks for contribution.
@vgmartinez and folks, how about having generalized event hook instead of just handling email after scheduler execution?
Zeppelin can generate events,
- Scheduler execution (start, success, fail)
- Paragraph execution (CRUD, status change)
- Notebook (CRUD)
- etc
And if there're some extensible mechanism that allow user plugin custom event handler. So possibly not only sending email, but also execute shell script or any other action will be possible for all type of events.
What do you think?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-zeppelin pull request: ZEPPELIN-885 Add option to send e...
Posted by bzz <gi...@git.apache.org>.
Github user bzz commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/918#issuecomment-222578818
@vgmartinez thank you for explaining the use case, it makes perfect sense and is not covered by the case I was referring to. May it's worth putting it in JIRA\PR description as well, how do you think?
@Leemoonsoo suggestion sounds really nice indeed. Even something simpler and less general with just an email would work as a first step, but email facilities better be placed outside of the `Notebook.java`. I presume it may very well be some kind of 'client' of the `Notebook.java` API inside zengine.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---