Return-Path: X-Original-To: apmail-aurora-reviews-archive@minotaur.apache.org Delivered-To: apmail-aurora-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E502C10C29 for ; Tue, 28 Jan 2014 22:26:55 +0000 (UTC) Received: (qmail 6695 invoked by uid 500); 28 Jan 2014 22:26:55 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 6670 invoked by uid 500); 28 Jan 2014 22:26:55 -0000 Mailing-List: contact reviews-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.incubator.apache.org Delivered-To: mailing list reviews@aurora.incubator.apache.org Received: (qmail 6662 invoked by uid 99); 28 Jan 2014 22:26:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 22:26:55 +0000 X-ASF-Spam-Status: No, hits=-1998.3 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; Tue, 28 Jan 2014 22:26:53 +0000 Received: (qmail 6292 invoked by uid 99); 28 Jan 2014 22:26:33 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 22:26:33 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id E9BC21D4693; Tue, 28 Jan 2014 22:26:30 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6849487508146762062==" MIME-Version: 1.0 Subject: Re: Review Request 16873: Refactor StateManagerImpl and TaskStateMachine for less code and better readability. From: "Bill Farner" To: "Maxim Khutornenko" , "Kevin Sweeney" Cc: "Bill Farner" , "Aurora" Date: Tue, 28 Jan 2014 22:26:30 -0000 Message-ID: <20140128222630.20513.22553@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/16873/ X-Sender: "Bill Farner" References: <20140122204309.11320.3194@reviews.apache.org> In-Reply-To: <20140122204309.11320.3194@reviews.apache.org> Reply-To: "Bill Farner" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============6849487508146762062== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > On Jan. 22, 2014, 8:43 p.m., Maxim Khutornenko wrote: > > src/main/java/org/apache/aurora/scheduler/state/SideEffect.java, line 77 > > > > > > Should these be javadoc comments instead? Good call, done. - Bill ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/16873/#review32511 ----------------------------------------------------------- On Jan. 14, 2014, 11:27 p.m., Bill Farner wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/16873/ > ----------------------------------------------------------- > > (Updated Jan. 14, 2014, 11:27 p.m.) > > > Review request for Aurora, Kevin Sweeney and Maxim Khutornenko. > > > Repository: aurora > > > Description > ------- > > Sorry for the monster diff. The intertwined nature of StateManagerImpl and TaskStateMachine made it pretty challenging to do this partially. I hope the end result is much easier to comprehend. > > The "big picture" for this change is that the closures inside TaskStateMachine no longer drop items onto a work queue that feeds back into StateManagerImpl. Instead, it returns these actions in a TransitionResult. I intend to improve this further in the future by exposing only a helper function in TaskStateMachine, to guarantee the one-time-use semantic. > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/state/SideEffect.java PRE-CREATION > src/main/java/org/apache/aurora/scheduler/state/SideEffectStorage.java 2bdd4591f2182fe6c44d46f778be562d30eb2392 > src/main/java/org/apache/aurora/scheduler/state/StateManagerImpl.java 2b8ca095d8f108d516a43af8de4ff451ed9a8924 > src/main/java/org/apache/aurora/scheduler/state/TaskStateMachine.java 11d283d31883b865b224d5af169dd5c42875021d > src/main/java/org/apache/aurora/scheduler/state/WorkCommand.java aff74d535eb1237beafbcdf936d5ccc7101377c9 > src/main/java/org/apache/aurora/scheduler/storage/Storage.java 79f56052a25ba756208e747dc5d198f30f0c4900 > src/main/java/org/apache/aurora/scheduler/storage/TaskStore.java 7fe297a37aee0cb1be495e6a568b66271ee7bc3d > src/test/java/org/apache/aurora/scheduler/state/StateManagerImplTest.java 53793000de08fe80c0334241d332e3a50fca222a > src/test/java/org/apache/aurora/scheduler/state/TaskStateMachineTest.java f44ee589430c2d4c0e014a705fd24b1f2fe08f36 > > Diff: https://reviews.apache.org/r/16873/diff/ > > > Testing > ------- > > ./gradlew build > > > Thanks, > > Bill Farner > > --===============6849487508146762062==--