Return-Path: X-Original-To: apmail-aurora-dev-archive@minotaur.apache.org Delivered-To: apmail-aurora-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DDBEB10EE6 for ; Fri, 13 Dec 2013 01:08:10 +0000 (UTC) Received: (qmail 14391 invoked by uid 500); 13 Dec 2013 01:08:10 -0000 Delivered-To: apmail-aurora-dev-archive@aurora.apache.org Received: (qmail 14361 invoked by uid 500); 13 Dec 2013 01:08:10 -0000 Mailing-List: contact dev-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.incubator.apache.org Delivered-To: mailing list dev@aurora.incubator.apache.org Received: (qmail 14352 invoked by uid 99); 13 Dec 2013 01:08:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Dec 2013 01:08:10 +0000 X-ASF-Spam-Status: No, hits=-1997.9 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 13 Dec 2013 01:08:09 +0000 Received: (qmail 12804 invoked by uid 99); 13 Dec 2013 01:07:49 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Dec 2013 01:07:49 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 5C5AF1D3EA8; Fri, 13 Dec 2013 01:07:48 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============9138373490678446551==" MIME-Version: 1.0 Subject: Re: Review Request 16220: Output all states in maintenance endpoint. From: "Bill Farner" To: "Bill Farner" , "Kevin Sweeney" Cc: "Zameer Manji" , "Aurora" Date: Fri, 13 Dec 2013 01:07:48 -0000 Message-ID: <20131213010748.2213.38942@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Bill Farner" X-ReviewGroup: Aurora X-ReviewRequest-URL: https://reviews.apache.org/r/16220/ X-Sender: "Bill Farner" References: <20131213005628.3768.4370@reviews.apache.org> In-Reply-To: <20131213005628.3768.4370@reviews.apache.org> Reply-To: "Bill Farner" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============9138373490678446551== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/16220/#review30316 ----------------------------------------------------------- Looking much better, i suspect this is the last round-trip before a ship. src/main/java/com/twitter/aurora/scheduler/http/Maintenance.java At this point, you might as well just return Response from the storage op src/main/java/com/twitter/aurora/scheduler/http/Maintenance.java This is probably more appropriately-named getTasksByHosts() src/main/java/com/twitter/aurora/scheduler/http/Maintenance.java (1) please leave a blank line between a wrapped method signature and the method body (2) indentation is funky in this method src/main/java/com/twitter/aurora/scheduler/state/MaintenanceController.java I generally dislike embedding the type in the variable name. IMHO, 'attributes' is sufficient, and the type explains that it might be absent. src/main/java/com/twitter/aurora/scheduler/state/MaintenanceController.java I would find this more concise and more readable: if (attributes.isPresent() && (DRAINING == attributes.getMode())) { ... } src/main/java/com/twitter/aurora/scheduler/state/MaintenanceController.java inline below src/main/java/com/twitter/aurora/scheduler/state/MaintenanceController.java please kindly give intellij a smack and revert - Bill Farner On Dec. 13, 2013, 12:56 a.m., Zameer Manji wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/16220/ > ----------------------------------------------------------- > > (Updated Dec. 13, 2013, 12:56 a.m.) > > > Review request for Aurora, Kevin Sweeney and Bill Farner. > > > Bugs: AURORA-9 > https://issues.apache.org/jira/browse/AURORA-9 > > > Repository: aurora > > > Description > ------- > > Improve the /maintenance endpoint to print out hosts affected by SCHEDULED and DRAINED states. > > > Diffs > ----- > > src/main/java/com/twitter/aurora/scheduler/http/Maintenance.java 30afce37d6c108a5a8c1c3c8a8094030ad12ce72 > src/main/java/com/twitter/aurora/scheduler/state/MaintenanceController.java fb12d38858b260d1d9ce318d3022cd93413a3e68 > src/test/java/com/twitter/aurora/scheduler/state/MaintenanceControllerImplTest.java 8acb716c733ec9d3cc3b1ec74c85f958082ae139 > > Diff: https://reviews.apache.org/r/16220/diff/ > > > Testing > ------- > > ./gradlew clean build > > > Thanks, > > Zameer Manji > > --===============9138373490678446551==--