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 E50CD11E62 for ; Thu, 28 Aug 2014 13:15:14 +0000 (UTC) Received: (qmail 57898 invoked by uid 500); 28 Aug 2014 13:15:14 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 57869 invoked by uid 500); 28 Aug 2014 13:15:14 -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 57855 invoked by uid 99); 28 Aug 2014 13:15:14 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2014 13:15:14 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 8DB461DBE6B; Thu, 28 Aug 2014 13:15:14 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8328394638921022478==" MIME-Version: 1.0 Subject: Re: Review Request 25139: Alerts: Expose Creation and Updating of Group Targets & Definitions From: "Jonathan Hurley" To: "Nate Cole" , "Tom Beerbower" Cc: "Ambari" , "Jonathan Hurley" Date: Thu, 28 Aug 2014 13:15:14 -0000 Message-ID: <20140828131514.17464.88571@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/25139/ X-Sender: "Jonathan Hurley" References: <20140828115935.17468.79716@reviews.apache.org> In-Reply-To: <20140828115935.17468.79716@reviews.apache.org> Reply-To: "Jonathan Hurley" X-ReviewRequest-Repository: ambari --===============8328394638921022478== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Aug. 28, 2014, 7:59 a.m., Nate Cole wrote: > > It's ok if it doesn't, but the sample has passing string arrays instead of longs? I think this is a first in that we're passing a collection of IDs to associate with an existing entity. As such, we're using some kind of frankenJackson parsing and it doesn't like longs. I'm going to open a Jira to investigate this. - Jonathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25139/#review51768 ----------------------------------------------------------- On Aug. 28, 2014, 12:50 a.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25139/ > ----------------------------------------------------------- > > (Updated Aug. 28, 2014, 12:50 a.m.) > > > Review request for Ambari, Nate Cole and Tom Beerbower. > > > Bugs: AMBARI-7051 > https://issues.apache.org/jira/browse/AMBARI-7051 > > > Repository: ambari > > > Description > ------- > > The alert group endpoint was changed to allow creating associations with targets and definitions. Through either the PUT or POST operations, alert definitions and alert targets can be added or removed from an alert group. > > The returned data when quering the alert group was also updated to include information about the targets and definitions. When querying a collection, basic information such as name and ID are returned. More detailed information is returned on querying an individual group. > > The python scripts were also updated to change the get_host_from_url method to be a static member of BaseAlert. It now returns None if only a port is supplied. PortAlert checks for this None value and uses self.host_name as the name of the host. > > See > > https://issues.apache.org/jira/browse/AMBARI-7021 > https://issues.apache.org/jira/browse/AMBARI-7051 > > for JSON examples. > > > Diffs > ----- > > ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py 88c7f92afae6a8d39eae4ab44c89e9aa2e410cdd > ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py eaf744a9ae14e45e3ba21aab1e34e864af91c82e > ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertGroupService.java c2e5048823579dd689d565cd2fc688add08f9c6e > ambari-server/src/main/java/org/apache/ambari/server/controller/AlertDefinitionResponse.java PRE-CREATION > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProvider.java f14e76f04b8fd376ab63bea1de7caa1475927b05 > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java 4a8fe126b4392cd8b7ae47cbcc2588bbd826a366 > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDispatchDAO.java dfbe747e880e0a1247d526a94c7c3a305c731c90 > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java 299467c87d098adbd8a922e2b95925f44c64d44f > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java 1ca592c87669853acf05764be0893526876b7233 > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java 89728e5b34d92b52c82c5ded2ae06e443a4e6ce7 > ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertTarget.java 21e83d9a20d1dac03055fb1e7ced8707ee905907 > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProviderTest.java c9428b7f37bf798f5fff4832389d1e6d76f8fc3b > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java 982dd4b1826fc0788424a1d6e13cc0189351c2ce > ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java a7ef51306d5fb871c29d43779fbb9c8b0d8a6aa5 > ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 894f2c27477b04b43f211b7a1a5ce66b9cccc1ee > > Diff: https://reviews.apache.org/r/25139/diff/ > > > Testing > ------- > > New tests added to cover added functionality. > > $ mvn clean test > > [INFO] ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] ------------------------------------------------------------------------ > [INFO] Total time: 17:46 min > [INFO] Finished at: 2014-08-27T21:25:40-04:00 > [INFO] Final Memory: 21M/204M > [INFO] ------------------------------------------------------------------------ > > > Thanks, > > Jonathan Hurley > > --===============8328394638921022478==--