From reviews-return-76362-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Wed Apr 18 21:55:19 2018 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 44823183D9 for ; Wed, 18 Apr 2018 21:55:19 +0000 (UTC) Received: (qmail 9695 invoked by uid 500); 18 Apr 2018 21:55:19 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 9665 invoked by uid 500); 18 Apr 2018 21:55:19 -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 9645 invoked by uid 99); 18 Apr 2018 21:55:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2018 21:55:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 13860C61AC; Wed, 18 Apr 2018 21:55:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.95 X-Spam-Level: X-Spam-Status: No, score=0.95 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id whlN6A4cNo3i; Wed, 18 Apr 2018 21:55:17 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id B152D5F19C; Wed, 18 Apr 2018 21:55:16 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0D336E0056; Wed, 18 Apr 2018 21:55:16 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id D33A4C4021F; Wed, 18 Apr 2018 21:55:15 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0066977321640665784==" MIME-Version: 1.0 Subject: Re: Review Request 66309: Externalized creation of resource provider manager backing storage. From: Chun-Hung Hsiao To: Jie Yu , Jan Schlicht Cc: Benjamin Bannier , Chun-Hung Hsiao , mesos Date: Wed, 18 Apr 2018 21:55:15 -0000 Message-ID: <20180418215515.3189.25311@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Chun-Hung Hsiao X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/66309/ X-Sender: Chun-Hung Hsiao References: <20180418215104.3189.91971@reviews-vm2.apache.org> In-Reply-To: <20180418215104.3189.91971@reviews-vm2.apache.org> Reply-To: Chun-Hung Hsiao X-ReviewRequest-Repository: mesos --===============0066977321640665784== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On April 18, 2018, 9:51 p.m., Chun-Hung Hsiao wrote: > > src/resource_provider/registrar.hpp > > Lines 67-73 (original), 69-75 (patched) > > > > > > Not yours, but if each `create()` corresponds to a different type of registrar, how about moving these functions into their corresponding `MasterRegistrar` and `AgentRegistrar`? > > > > I guess it depends on how meanful it is to encapsulate the actual type of registrar from the callers. Also, if there is no need to encapsulate the actual type of registrar, then it is meanleass to have these `create()` functions, since we don't do extra checks and return errors. - Chun-Hung ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66309/#review201469 ----------------------------------------------------------- On April 10, 2018, 12:07 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66309/ > ----------------------------------------------------------- > > (Updated April 10, 2018, 12:07 p.m.) > > > Review request for mesos, Jie Yu and Jan Schlicht. > > > Bugs: MESOS-8735 > https://issues.apache.org/jira/browse/MESOS-8735 > > > Repository: mesos > > > Description > ------- > > This patch changes the way the storage backing an agent's resource > provider registrar is created: while before we created it implicitly > when constructing the registrar, we now consume storage passed on > construction. > > Being able to explicitly inject the used storage simplifies testing. > > > Diffs > ----- > > src/resource_provider/registrar.hpp 39f45b0a2a7c35bfe72a9305f5248409e4a3ef45 > src/resource_provider/registrar.cpp 92ef9aecb1e93d10f46e53984391558f9901a60b > src/tests/resource_provider_manager_tests.cpp c52541bf130ccf4795b989b53331176a64a097ea > > > Diff: https://reviews.apache.org/r/66309/diff/3/ > > > Testing > ------- > > `make check` > > > Thanks, > > Benjamin Bannier > > --===============0066977321640665784==--