[jira] [Commented] (EAGLE-475) Fix generic email publisher and publish emails for absence alert.

2016-08-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/EAGLE-475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15427178#comment-15427178
 ] 

ASF GitHub Bot commented on EAGLE-475:
--

Github user yonzhang commented on the issue:

https://github.com/apache/incubator-eagle/pull/359
  
LGTM and merged


> Fix generic email publisher and publish emails for absence alert.
> -
>
> Key: EAGLE-475
> URL: https://issues.apache.org/jira/browse/EAGLE-475
> Project: Eagle
>  Issue Type: Bug
>Affects Versions: v0.5.0
>Reporter: Huizhi Lu
>Assignee: Huizhi Lu
> Fix For: v0.5.0
>
>
> 1) Absence alerts could not be published via emails.
> Root cause: in AbsencePolicyHandler, alert stream events were not emitted to 
> alert bolt.
> Solution: collect alert stream events and emit them to alert bolt.
> 2) Email publisher did not work.
> Root cause: Email configurations were incorrect.
> Solution: correct the email configurations and add email authentications.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (EAGLE-475) Fix generic email publisher and publish emails for absence alert.

2016-08-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/EAGLE-475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15426939#comment-15426939
 ] 

ASF GitHub Bot commented on EAGLE-475:
--

Github user pkuwm commented on a diff in the pull request:

https://github.com/apache/incubator-eagle/pull/359#discussion_r75359890
  
--- Diff: 
eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/AlertBolt.java
 ---
@@ -111,9 +111,12 @@ public void execute(Tuple input) {
 pe.getEvent().setMetaVersion(specVersion);
 }
 // check if specVersion is older than stream_event_version
-else if (specVersion != null && stream_event_version != 
null && specVersion.contains("spec_version_") && 
specVersion.contains("spec_version_")){
-Long timestamp_of_specVersion = 
Long.valueOf(specVersion.split("spec_version_")[1]);
-Long timestamp_of_streamEventVersion = 
Long.valueOf(stream_event_version.split("spec_version_")[1]);
+else if (specVersion != null && stream_event_version != 
null &&
+specVersion.contains("spec_version_") && 
stream_event_version.contains("spec_version_")){
+//Long timestamp_of_specVersion = 
Long.valueOf(specVersion.split("spec_version_")[1]);
+//Long timestamp_of_streamEventVersion = 
Long.valueOf(stream_event_version.split("spec_version_")[1]);
+Long timestamp_of_specVersion = 
Long.valueOf(specVersion.substring(13));
--- End diff --

What I got for "specVersion" is "spec_version_1471478137249". split[1] 
would be out of array index.
So I just substring the timestamp.


> Fix generic email publisher and publish emails for absence alert.
> -
>
> Key: EAGLE-475
> URL: https://issues.apache.org/jira/browse/EAGLE-475
> Project: Eagle
>  Issue Type: Bug
>Affects Versions: v0.5.0
>Reporter: Huizhi Lu
>Assignee: Huizhi Lu
> Fix For: v0.5.0
>
>
> 1) Absence alerts could not be published via emails.
> Root cause: in AbsencePolicyHandler, alert stream events were not emitted to 
> alert bolt.
> Solution: collect alert stream events and emit them to alert bolt.
> 2) Email publisher did not work.
> Root cause: Email configurations were incorrect.
> Solution: correct the email configurations and add email authentications.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (EAGLE-475) Fix generic email publisher and publish emails for absence alert.

2016-08-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/EAGLE-475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15425634#comment-15425634
 ] 

ASF GitHub Bot commented on EAGLE-475:
--

GitHub user pkuwm opened a pull request:

https://github.com/apache/incubator-eagle/pull/359

EAGLE-475 - Fix generic email publisher and publish emails for absenc…

…e alert.

1) Absence alerts could not be published via emails.
Root cause: in AbsencePolicyHandler, alert stream events were not emitted 
to alert bolt.
Solution: collect alert stream events and emit them to alert bolt.
2) Email publisher did not work.
Root cause: Email configurations were incorrect.
Solution: correct the email configurations and add email authentications.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/pkuwm/incubator-eagle EAGLE-475

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-eagle/pull/359.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 #359


commit 6d1e99a0b03d4a9894bd3f3b53e981d5fd18dfe1
Author: pkuwm 
Date:   2016-08-18T00:06:55Z

EAGLE-475 - Fix generic email publisher and publish emails for absence 
alert.




> Fix generic email publisher and publish emails for absence alert.
> -
>
> Key: EAGLE-475
> URL: https://issues.apache.org/jira/browse/EAGLE-475
> Project: Eagle
>  Issue Type: Bug
>Affects Versions: v0.5.0
>Reporter: Huizhi Lu
>Assignee: Huizhi Lu
> Fix For: v0.5.0
>
>
> 1) Absence alerts could not be published via emails.
> Root cause: in AbsencePolicyHandler, alert stream events were not emitted to 
> alert bolt.
> Solution: collect alert stream events and emit them to alert bolt.
> 2) Email publisher did not work.
> Root cause: Email configurations were incorrect.
> Solution: correct the email configurations and add email authentications.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)