You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@eagle.apache.org by qingwen220 <gi...@git.apache.org> on 2017/04/20 11:21:29 UTC

[GitHub] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

GitHub user qingwen220 opened a pull request:

    https://github.com/apache/eagle/pull/926

    EAGLE-993: add duplicate removal settings in policy definition

    https://issues.apache.org/jira/browse/EAGLE-993

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

    $ git pull https://github.com/qingwen220/eagle EAGLE-993

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

    https://github.com/apache/eagle/pull/926.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 #926
    
----
commit 13dc0ff75ae812aef1e599fca36809db704ee840
Author: Zhao, Qingwen <qi...@apache.org>
Date:   2017-04-06T11:34:09Z

    refine publishmentType

commit 5953465b12c87f0d0f98a5220da87e35d78a9c2e
Author: Zhao, Qingwen <qi...@apache.org>
Date:   2017-04-06T11:35:23Z

    update policy deletion

commit 7faf383445626ccc7650cf925f8637c0dbc204ac
Author: Zhao, Qingwen <qi...@apache.org>
Date:   2017-04-07T13:50:01Z

    add AlertDeduplication

commit 92165c143386274616c8fcb5483c7b1b46fdb42b
Author: Zhao, Qingwen <qi...@apache.org>
Date:   2017-04-06T11:34:09Z

    refine publishmentType

commit 6db2bdfe49ae63fb85b849198fa38b825b373450
Author: Zhao, Qingwen <qi...@apache.org>
Date:   2017-04-06T11:35:23Z

    update policy deletion

commit b447b4dde577ca5f2e9df7e41380d270a40008e6
Author: Zhao, Qingwen <qi...@apache.org>
Date:   2017-04-07T13:50:01Z

    add AlertDeduplication

commit be54624b74eb65f91e9cbd8ebd9bccd19ac30874
Author: Zhao, Qingwen <qi...@apache.org>
Date:   2017-04-11T01:28:37Z

    Merge branch 'EAGLE-993' of https://github.com/qingwen220/incubator-eagle into EAGLE-993

----


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by asdf2014 <gi...@git.apache.org>.
Github user asdf2014 commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r112591726
  
    --- Diff: eagle-jpm/eagle-jpm-mr-history/src/test/resources/job_1479206441898_508949_conf.xml ---
    @@ -1,18 +1,164 @@
    -<!--
    -   Licensed to the Apache Software Foundation (ASF) under one or more
    -   contributor license agreements.  See the NOTICE file distributed with
    -   this work for additional information regarding copyright ownership.
    -   The ASF licenses this file to You under the Apache License, Version 2.0
    -   (the "License"); you may not use this file except in compliance with
    -   the License.  You may obtain a copy of the License at
    -
    -       http://www.apache.org/licenses/LICENSE-2.0
    -
    -   Unless required by applicable law or agreed to in writing, software
    -   distributed under the License is distributed on an "AS IS" BASIS,
    -   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -   See the License for the specific language governing permissions and
    -   limitations under the License.
    --->
    --- End diff --
    
    Why remove the `License`?


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by jhsenjaliya <gi...@git.apache.org>.
Github user jhsenjaliya commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r112627380
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertEmailPublisher.java ---
    @@ -215,7 +214,6 @@ public PublishmentType getPluginType() {
                     .name("Email")
                     .type(AlertEmailPublisher.class)
                     .description("Email alert publisher")
    -                .field("subject")
    --- End diff --
    
    right, its duplicated, Thanks


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/eagle/pull/926


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by qingwen220 <gi...@git.apache.org>.
Github user qingwen220 commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r112595515
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertEmailPublisher.java ---
    @@ -215,7 +214,6 @@ public PublishmentType getPluginType() {
                     .name("Email")
                     .type(AlertEmailPublisher.class)
                     .description("Email alert publisher")
    -                .field("subject")
    --- End diff --
    
    Yes. 
    
    As we already define the email subject in the policy definition. it's a little duplicated. How 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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by garrettlish <gi...@git.apache.org>.
Github user garrettlish commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r112622533
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/AlertPublisherBolt.java ---
    @@ -87,6 +90,12 @@ public void execute(Tuple input) {
                 if (logEventEnabled) {
                     LOG.info("Alert publish bolt {}/{} with partition {} received event: {}", this.getBoltId(), this.context.getThisTaskId(), partition, event);
                 }
    +            if (deduplicatorMap != null && deduplicatorMap.containsKey(event.getPolicyId())) {
    +                List<AlertStreamEvent> eventList = deduplicatorMap.get(event.getPolicyId()).dedup(event);
    +                if (eventList == null || eventList.isEmpty()) {
    +                    return;
    --- End diff --
    
    missing ack here


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by qingwen220 <gi...@git.apache.org>.
Github user qingwen220 commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r113704536
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/runner/AlertPublisherBolt.java ---
    @@ -87,6 +90,12 @@ public void execute(Tuple input) {
                 if (logEventEnabled) {
                     LOG.info("Alert publish bolt {}/{} with partition {} received event: {}", this.getBoltId(), this.context.getThisTaskId(), partition, event);
                 }
    +            if (deduplicatorMap != null && deduplicatorMap.containsKey(event.getPolicyId())) {
    +                List<AlertStreamEvent> eventList = deduplicatorMap.get(event.getPolicyId()).dedup(event);
    +                if (eventList == null || eventList.isEmpty()) {
    +                    return;
    --- End diff --
    
    You are right. Thanks


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by garrettlish <gi...@git.apache.org>.
Github user garrettlish commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r112622249
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertPublisherImpl.java ---
    @@ -73,11 +76,11 @@ public void nextEvent(PublishPartition partition, AlertStreamEvent event) {
         private void notifyAlert(PublishPartition partition, AlertStreamEvent event) {
             // remove the column values for publish plugin match
             partition.getColumnValues().clear();
    -        if (!publishPluginMapping.containsKey(partition)) {
    +        if (!publishPluginMapping.containsKey(partition.getPublishId())) {
    --- End diff --
    
    In publisher, we are able to specify the accepted streamId list, here how can we handle dropping the alert which comes from the stream which is NOT defined accepted streamId list? 


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by qingwen220 <gi...@git.apache.org>.
Github user qingwen220 commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r113703970
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertPublisherImpl.java ---
    @@ -73,11 +76,11 @@ public void nextEvent(PublishPartition partition, AlertStreamEvent event) {
         private void notifyAlert(PublishPartition partition, AlertStreamEvent event) {
             // remove the column values for publish plugin match
             partition.getColumnValues().clear();
    -        if (!publishPluginMapping.containsKey(partition)) {
    +        if (!publishPluginMapping.containsKey(partition.getPublishId())) {
    --- End diff --
    
    Sorry for the late reply. 
    
    For the alert dropping off of unwanted stream is handled in AlertBoltOutputCollectorWrapper, which are kept as it is. 
    
    In this class, i just simplify the coding, which should keeps the original logic. How do you think? @garrettlish 


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by asdf2014 <gi...@git.apache.org>.
Github user asdf2014 commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r112595490
  
    --- Diff: eagle-jpm/eagle-jpm-mr-history/src/test/resources/job_1479206441898_508949_conf.xml ---
    @@ -1,18 +1,164 @@
    -<!--
    -   Licensed to the Apache Software Foundation (ASF) under one or more
    -   contributor license agreements.  See the NOTICE file distributed with
    -   this work for additional information regarding copyright ownership.
    -   The ASF licenses this file to You under the Apache License, Version 2.0
    -   (the "License"); you may not use this file except in compliance with
    -   the License.  You may obtain a copy of the License at
    -
    -       http://www.apache.org/licenses/LICENSE-2.0
    -
    -   Unless required by applicable law or agreed to in writing, software
    -   distributed under the License is distributed on an "AS IS" BASIS,
    -   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -   See the License for the specific language governing permissions and
    -   limitations under the License.
    --->
    --- End diff --
    
    Okay.


---
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] eagle issue #926: EAGLE-993: add duplicate removal settings in policy defini...

Posted by garrettlish <gi...@git.apache.org>.
Github user garrettlish commented on the issue:

    https://github.com/apache/eagle/pull/926
  
    +1


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by jhsenjaliya <gi...@git.apache.org>.
Github user jhsenjaliya commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r112565522
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertEmailPublisher.java ---
    @@ -215,7 +214,6 @@ public PublishmentType getPluginType() {
                     .name("Email")
                     .type(AlertEmailPublisher.class)
                     .description("Email alert publisher")
    -                .field("subject")
    --- End diff --
    
    is this intended ?


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by garrettlish <gi...@git.apache.org>.
Github user garrettlish commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r113903238
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertPublisherImpl.java ---
    @@ -73,11 +76,11 @@ public void nextEvent(PublishPartition partition, AlertStreamEvent event) {
         private void notifyAlert(PublishPartition partition, AlertStreamEvent event) {
             // remove the column values for publish plugin match
             partition.getColumnValues().clear();
    -        if (!publishPluginMapping.containsKey(partition)) {
    +        if (!publishPluginMapping.containsKey(partition.getPublishId())) {
    --- End diff --
    
    u can keep you simplified code, it looks good


---
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] eagle pull request #926: EAGLE-993: add duplicate removal settings in policy...

Posted by qingwen220 <gi...@git.apache.org>.
Github user qingwen220 commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/926#discussion_r112595389
  
    --- Diff: eagle-jpm/eagle-jpm-mr-history/src/test/resources/job_1479206441898_508949_conf.xml ---
    @@ -1,18 +1,164 @@
    -<!--
    -   Licensed to the Apache Software Foundation (ASF) under one or more
    -   contributor license agreements.  See the NOTICE file distributed with
    -   this work for additional information regarding copyright ownership.
    -   The ASF licenses this file to You under the Apache License, Version 2.0
    -   (the "License"); you may not use this file except in compliance with
    -   the License.  You may obtain a copy of the License at
    -
    -       http://www.apache.org/licenses/LICENSE-2.0
    -
    -   Unless required by applicable law or agreed to in writing, software
    -   distributed under the License is distributed on an "AS IS" BASIS,
    -   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -   See the License for the specific language governing permissions and
    -   limitations under the License.
    --->
    --- End diff --
    
    My mistake. I will add it back.


---
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.
---