Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B3E16174D6 for ; Mon, 20 Apr 2015 03:03:52 +0000 (UTC) Received: (qmail 55250 invoked by uid 500); 20 Apr 2015 03:03:52 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 55211 invoked by uid 500); 20 Apr 2015 03:03:52 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 55190 invoked by uid 99); 20 Apr 2015 03:03:52 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Apr 2015 03:03:52 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id AB31E1D550F; Mon, 20 Apr 2015 03:03:53 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8714956370843542124==" MIME-Version: 1.0 Subject: Review Request 33344: Expose A Way To Register Custom Alert Dispatchers From: "Jonathan Hurley" To: "Nate Cole" , "Tom Beerbower" Cc: "Ambari" , "Jonathan Hurley" Date: Mon, 20 Apr 2015 03:03:53 -0000 Message-ID: <20150420030353.2948.76650@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Jonathan Hurley" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/33344/ X-Sender: "Jonathan Hurley" Reply-To: "Jonathan Hurley" X-ReviewRequest-Repository: ambari --===============8714956370843542124== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33344/ ----------------------------------------------------------- Review request for Ambari, Nate Cole and Tom Beerbower. Bugs: AMBARI-10590 https://issues.apache.org/jira/browse/AMBARI-10590 Repository: ambari Description ------- There are currently 2 tightly coupled dispatchers that ship with Ambari: EMAIL and SNMP. In the event that a user would like to register their own dispatcher after installing Ambari, we should expose a way for them to register that dispatcher with Ambari Server so that they can create alert targets for the dispatcher's type. - Custom dispatchers will need to be picked up from the classpath dynamically at runtime and registered - A new state needs to be added to Alert Notices to indicate that they have been processed in the event that a dispatcher does not set the final delivery state on the notice Diffs ----- ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java 36ae66b ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java f341db0 ambari-server/src/main/java/org/apache/ambari/server/notifications/DispatchFactory.java 2675533 ambari-server/src/main/java/org/apache/ambari/server/notifications/Notification.java 12dffd7 ambari-server/src/main/java/org/apache/ambari/server/notifications/NotificationDispatcher.java 19d813f ambari-server/src/main/java/org/apache/ambari/server/notifications/TargetConfigurationResult.java PRE-CREATION ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/EmailDispatcher.java 4761370 ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/SNMPDispatcher.java e0751bf ambari-server/src/main/java/org/apache/ambari/server/state/NotificationState.java ef69deb ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java 974dcdf ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java 40d2241 ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java PRE-CREATION ambari-server/src/test/java/org/apache/ambari/server/notifications/MockDispatcher.java ae73b51 ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/EmailDispatcherTest.java 919d747 ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/SNMPDispatcherTest.java 07ca3ae ambari-server/src/test/java/org/apache/ambari/server/state/services/AlertNoticeDispatchServiceTest.java 3f09db0 Diff: https://reviews.apache.org/r/33344/diff/ Testing ------- Manual testing of a custom NOOP dispatcher to verify that notices are moved into the DISPATCHED state after being processed. mvn clean test Thanks, Jonathan Hurley --===============8714956370843542124==--