Return-Path: X-Original-To: apmail-mesos-dev-archive@www.apache.org Delivered-To: apmail-mesos-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 51DBA102FE for ; Tue, 16 Dec 2014 23:57:24 +0000 (UTC) Received: (qmail 68477 invoked by uid 500); 16 Dec 2014 23:57:24 -0000 Delivered-To: apmail-mesos-dev-archive@mesos.apache.org Received: (qmail 68431 invoked by uid 500); 16 Dec 2014 23:57:24 -0000 Mailing-List: contact dev-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list dev@mesos.apache.org Received: (qmail 68418 invoked by uid 99); 16 Dec 2014 23:57:23 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2014 23:57:23 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 1D0791D210E; Tue, 16 Dec 2014 23:57:20 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1395347380945361994==" MIME-Version: 1.0 Subject: Re: Review Request 28720: Adjusted the calculation of unused resources in _launchTasks by considering persistent disk acquisition. From: "Jie Yu" To: "Ben Mahler" Cc: "Jie Yu" , "mesos" Date: Tue, 16 Dec 2014 23:57:20 -0000 Message-ID: <20141216235720.12942.22859@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Jie Yu" X-ReviewGroup: mesos X-ReviewRequest-URL: https://reviews.apache.org/r/28720/ X-Sender: "Jie Yu" References: <20141216215916.12934.82504@reviews.apache.org> In-Reply-To: <20141216215916.12934.82504@reviews.apache.org> Reply-To: "Jie Yu" X-ReviewRequest-Repository: mesos-git --===============1395347380945361994== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Dec. 16, 2014, 9:59 p.m., Ben Mahler wrote: > > src/common/resources.cpp, lines 922-930 > > > > > > Duplicate persistence IDs are allowed across roles? Is that handled everywhere else in the code? Yes. It's handled. Also, see include/mesos/mesos.proto > On Dec. 16, 2014, 9:59 p.m., Ben Mahler wrote: > > src/common/resources.cpp, line 928 > > > > > > Can we include the ID? Done. > On Dec. 16, 2014, 9:59 p.m., Ben Mahler wrote: > > src/common/resources.cpp, line 909 > > > > > > How about splitting these checks? > > > > ``` > > CHECK(disk.has_disk()); > > CHECK(disk.disk().has_persistence()); > > ``` Done. > On Dec. 16, 2014, 9:59 p.m., Ben Mahler wrote: > > src/common/resources.cpp, lines 946-947 > > > > > > How about `stripped` or `strippedDisk`? Might be a bit easier to read. Done. > On Dec. 16, 2014, 9:59 p.m., Ben Mahler wrote: > > src/common/resources.cpp, line 958 > > > > > > How about: > > > > ``` > > return Error("Insufficient disk resources"); > > ``` Done. - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28720/#review65237 ----------------------------------------------------------- On Dec. 16, 2014, 9:11 p.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28720/ > ----------------------------------------------------------- > > (Updated Dec. 16, 2014, 9:11 p.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-2030 > https://issues.apache.org/jira/browse/MESOS-2030 > > > Repository: mesos-git > > > Description > ------- > > Introduced an abstraction for mutating resources. Acquiring persistent disk is one type of resources mutation. > > Infer persistent disk acquisitions from resources and check resource usage against adjusted total resources. > > Adjusted the calculation of unused resources in _launchTasks by considering persistent disk acquisition. > > > Diffs > ----- > > include/mesos/resources.hpp 296553af93ec8457dad04ac018f03f36df654fdc > src/common/resources.cpp 9bf7ae9148d6db2829cc2866ac048fe018ae2c92 > src/master/master.cpp 0f55a5cc2d6845cbaace718a48f771d80aad0e6e > src/tests/resource_offers_tests.cpp e13b6c5460d9e6729843c40bed9e4d4e3f76d5d3 > > Diff: https://reviews.apache.org/r/28720/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jie Yu > > --===============1395347380945361994==--