Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8FF59200C38 for ; Wed, 15 Mar 2017 11:16:38 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8F081160B78; Wed, 15 Mar 2017 10:16:38 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D7BF7160B70 for ; Wed, 15 Mar 2017 11:16:37 +0100 (CET) Received: (qmail 79351 invoked by uid 500); 15 Mar 2017 10:16:37 -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 79334 invoked by uid 99); 15 Mar 2017 10:16:35 -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, 15 Mar 2017 10:16:35 +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 777C7C11CB; Wed, 15 Mar 2017 10:16:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.701 X-Spam-Level: **** X-Spam-Status: No, score=4.701 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_REPLYTO_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, NML_ADSP_CUSTOM_MED=1.2, RP_MATCHES_RCVD=-0.001] 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 YzhqU3xqD0aD; Wed, 15 Mar 2017 10:16:34 +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 9EC1E5FCD1; Wed, 15 Mar 2017 10:16:33 +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 EC341E05AE; Wed, 15 Mar 2017 10:16:32 +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 94A63C4045E; Wed, 15 Mar 2017 10:16:32 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8168439073236454598==" MIME-Version: 1.0 Subject: Re: Review Request 57254: Updated DRFSorter to support hierarchical roles. From: Jay Guo To: Benjamin Bannier , Benjamin Mahler , Michael Park Cc: Neil Conway , Jay Guo , mesos Date: Wed, 15 Mar 2017 10:16:32 -0000 Message-ID: <20170315101632.7929.35613@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Jay Guo X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/57254/ X-Sender: Jay Guo References: <20170314055926.3442.47492@reviews-vm2.apache.org> In-Reply-To: <20170314055926.3442.47492@reviews-vm2.apache.org> Reply-To: Jay Guo X-ReviewRequest-Repository: mesos archived-at: Wed, 15 Mar 2017 10:16:38 -0000 --===============8168439073236454598== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57254/#review168982 ----------------------------------------------------------- Per design doc, we always associate framework to a virtual role. In this implementation, however, virtual role is created ONLY when the leaf node is turned into internal node. Could you clarify a bit? src/master/allocator/sorter/drf/sorter.cpp Lines 101 (patched) It would be nice to add some comments here to help reader understand that we are traversing the tree using each element of `roles`, in order to position it in the tree, much like what `mkdir -p /path/to/create/dir` would do. - Jay Guo On March 14, 2017, 1:59 p.m., Neil Conway wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57254/ > ----------------------------------------------------------- > > (Updated March 14, 2017, 1:59 p.m.) > > > Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Michael Park. > > > Repository: mesos > > > Description > ------- > > This commit replaces the sorter's flat list of clients with a tree of > client names; this tree represents the hierarchical relationship between > sorter clients. Each node in the tree contains an (ordered) list of > pointers to child nodes. The tree might contain nodes that do not > correspond directly to sorter clients. For example, adding clients "a/b" > and "c/d" results in the following tree: > > root > -> a > -> b > -> c > -> d > > The `sort` member function still only returns one result for each > (active) client in the sorter. This is implemented by ensuring that each > sorter client is associated with a leaf node in the tree. Note that it > is possible for a leaf node to be transformed into an internal node by a > subsequent insertion; to handle this case, we "implicitly" create an > extra child node, which maintains the invariant that each client has a > leaf node. For example, if the client "a/b/x" is added to the tree > above, the result is: > > root > -> a > -> b > -> . > -> x > -> c > -> d > > The "." leaf node holds the allocation that has been made to the "a/b" > client itself; the "a/b" node holds the sum of all the allocations that > have been made to the subtree rooted at "a/b", which also includes > "a/b/x". > > > Diffs > ----- > > src/master/allocator/sorter/drf/metrics.cpp 15aab32db5ca1a7a14080e9bbb7c65283be3ec20 > src/master/allocator/sorter/drf/sorter.hpp 76329220e1115c1de7810fb69b943c78c078be59 > src/master/allocator/sorter/drf/sorter.cpp ed54680cecb637931fc344fbcf8fd3b14cc24295 > src/master/allocator/sorter/sorter.hpp b3029fcf7342406955760da53f1ae736769f308c > src/tests/hierarchical_allocator_tests.cpp dce619ec49db480685deb1bf8f7faeebe02e25b5 > src/tests/master_allocator_tests.cpp 9f3750215f2b72f6148d0c47cdde6a3f7dfb1b50 > src/tests/sorter_tests.cpp ec0636beb936d46a253d19322f2157abe95156b6 > > > Diff: https://reviews.apache.org/r/57254/diff/9/ > > > Testing > ------- > > > Thanks, > > Neil Conway > > --===============8168439073236454598==--