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 AEC459EFE for ; Tue, 9 Dec 2014 14:05:13 +0000 (UTC) Received: (qmail 81098 invoked by uid 500); 9 Dec 2014 14:05:13 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 81063 invoked by uid 500); 9 Dec 2014 14:05:13 -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 80999 invoked by uid 99); 9 Dec 2014 14:05:12 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2014 14:05:12 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 928B71D22E0; Tue, 9 Dec 2014 14:05:09 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0584688476289632180==" MIME-Version: 1.0 Subject: Re: Review Request 28823: AlertTargets Should Allow AlertGroup Associations To Be Modified From POST From: "Jonathan Hurley" To: "Nate Cole" , "Tom Beerbower" Cc: "Ambari" , "Jonathan Hurley" Date: Tue, 09 Dec 2014 14:05:09 -0000 Message-ID: <20141209140509.5766.39137@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/28823/ X-Sender: "Jonathan Hurley" References: <20141209013230.5765.3286@reviews.apache.org> In-Reply-To: <20141209013230.5765.3286@reviews.apache.org> Reply-To: "Jonathan Hurley" X-ReviewRequest-Repository: ambari --===============0584688476289632180== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Dec. 8, 2014, 8:32 p.m., Tom Beerbower wrote: > > Looks good. A couple minor comments ... Thanks for the review. > On Dec. 8, 2014, 8:32 p.m., Tom Beerbower wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java, lines 370-371 > > > > > > Could you simply pass groupIds to the ArrayList constructor? > > > > List ids = new ArrayList(groupIds); Fixed. > On Dec. 8, 2014, 8:32 p.m., Tom Beerbower wrote: > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java, line 254 > > > > > > should be alertGroups? Fixed. - Jonathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28823/#review64324 ----------------------------------------------------------- On Dec. 8, 2014, 4:57 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28823/ > ----------------------------------------------------------- > > (Updated Dec. 8, 2014, 4:57 p.m.) > > > Review request for Ambari, Nate Cole and Tom Beerbower. > > > Bugs: AMBARI-8595 > https://issues.apache.org/jira/browse/AMBARI-8595 > > > Repository: ambari > > > Description > ------- > > When updating or creating an AlertTarget, the AlertGroup associations for that AlertTarget should be able to modified. > > {code} > PUT http://localhost:8080/api/v1/alert_targets/1 > > { > "AlertTarget": { > "groups": [1,2] > } > } > {code} > > {code} > POST http://localhost:8080/api/v1/alert_targets/1 > > { > "AlertTarget": { > "name": "Simple", > "description": "This target does not work", > "notification_type": "FOO", > "groups": [1,2,3] > } > } > {code} > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java adb761b > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDispatchDAO.java 35c9ae4 > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java 6607fb0 > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java 146fe49 > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java 367e6d4 > ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 76a9ee2 > > Diff: https://reviews.apache.org/r/28823/diff/ > > > Testing > ------- > > Manually tested creation and updating groups via the alert target. New unit tests written to cover new methods and functionality. > > > Thanks, > > Jonathan Hurley > > --===============0584688476289632180==--