Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-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 4027517C4F for ; Thu, 23 Apr 2015 16:30:07 +0000 (UTC) Received: (qmail 13094 invoked by uid 500); 23 Apr 2015 16:30:06 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 13070 invoked by uid 500); 23 Apr 2015 16:30:06 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 13054 invoked by uid 99); 23 Apr 2015 16:30:06 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2015 16:30:06 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id F04FE1CC15B; Thu, 23 Apr 2015 16:30:06 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0067125967721982922==" MIME-Version: 1.0 Subject: Re: Review Request 32140: Enabled 'Resources' to handle 'Resource::ReservationInfo'. From: "Michael Park" To: "Alexander Rukletsov" , "Jie Yu" , "Ben Mahler" Cc: "Michael Park" , "mesos" Date: Thu, 23 Apr 2015 16:30:06 -0000 Message-ID: <20150423163006.2948.54274@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Michael Park" X-ReviewGroup: mesos X-ReviewRequest-URL: https://reviews.apache.org/r/32140/ X-Sender: "Michael Park" References: <20150415173634.1422.6049@reviews.apache.org> In-Reply-To: <20150415173634.1422.6049@reviews.apache.org> Reply-To: "Michael Park" X-ReviewRequest-Repository: mesos --===============0067125967721982922== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On April 15, 2015, 5:36 p.m., Alexander Rukletsov wrote: > > src/tests/mesos.hpp, lines 376-378 > > > > > > Why not putting the definition into `tests/mesos.cpp`? Here and below. > > Michael Park wrote: > I kept it consistent with other utility functions that live in this file: `createTask`, `createDiskInfo`, `createPersistentVolume`. I think we can fix this as a batch in a separate patch. > > Alexander Rukletsov wrote: > Mind creating a JIRA? Added [MESOS-2658](https://issues.apache.org/jira/browse/MESOS-2658) as a subtask of [MESOS-1622](https://issues.apache.org/jira/browse/MESOS-1622). - Michael ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32140/#review80201 ----------------------------------------------------------- On April 22, 2015, 8:36 p.m., Michael Park wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32140/ > ----------------------------------------------------------- > > (Updated April 22, 2015, 8:36 p.m.) > > > Review request for mesos, Alexander Rukletsov, Ben Mahler, and Jie Yu. > > > Bugs: MESOS-2476 > https://issues.apache.org/jira/browse/MESOS-2476 > > > Repository: mesos > > > Description > ------- > > `Resource::ReservationInfo` was introduced in [r32139](https://reviews.apache.org/r/32139). We need to consider it in our `Resources` class implementation. > > ### `Resources::flatten` > > `flatten` is used as the utility function to cross reservation boundaries without affecting the given resources. Since the reservation is now specified by the (`role`, `reservation`) pair, `flatten` needs to consider `ReservationInfo` as well. > > ### `Resources::validate` > > If `role == "*"`, then `reservation` field must not be set. > > ### `Resources` comparators > > `operator==`, `addable` and `substractable` need to test for `ReservationInfo` as well. > > > Diffs > ----- > > include/mesos/resources.hpp 56affd45e1e71e96ff5778b43271f81b9b9a9e4d > src/common/resources.cpp 2c99b6884d7296099e19e2e3182cbe11b5e1e059 > src/tests/mesos.hpp 4294e28f904161b473c0cfa7feea4eaa4e7c97e3 > src/tests/resources_tests.cpp 7e0ad98c3366f647f190363a0e6b576dbfc7d415 > > Diff: https://reviews.apache.org/r/32140/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Michael Park > > --===============0067125967721982922==--