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 F137D200CB4 for ; Tue, 27 Jun 2017 19:58:33 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EF80C160BDC; Tue, 27 Jun 2017 17:58:33 +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 3D193160BD8 for ; Tue, 27 Jun 2017 19:58:33 +0200 (CEST) Received: (qmail 99657 invoked by uid 500); 27 Jun 2017 17:58:32 -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 99645 invoked by uid 99); 27 Jun 2017 17:58:32 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jun 2017 17:58:32 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C463E1A015B; Tue, 27 Jun 2017 17:58:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 6pQ3w7tN6gCj; Tue, 27 Jun 2017 17:58:30 +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 B7E9860CCB; Tue, 27 Jun 2017 17:58:29 +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 13961E00A0; Tue, 27 Jun 2017 17:58:29 +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 EDEA5C40385; Tue, 27 Jun 2017 17:58:28 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1872574851681222290==" MIME-Version: 1.0 Subject: Re: Review Request 60369: Exposed allocated resources per each role in /state endpoint on agent. From: haosdent huang To: haosdent huang , Benjamin Mahler Cc: Andrei Budnik , mesos Date: Tue, 27 Jun 2017 17:58:28 -0000 Message-ID: <20170627175828.20029.76050@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: haosdent huang X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/60369/ X-Sender: haosdent huang References: <20170627171005.20028.64417@reviews-vm2.apache.org> In-Reply-To: <20170627171005.20028.64417@reviews-vm2.apache.org> Reply-To: haosdent huang X-ReviewRequest-Repository: mesos archived-at: Tue, 27 Jun 2017 17:58:34 -0000 --===============1872574851681222290== 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/60369/#review179000 ----------------------------------------------------------- src/slave/http.cpp Lines 1334-1344 (patched) Should we follow this pattern? ``` writer->field( "reserved_resources_full", [&totalResources](JSON::ObjectWriter* writer) { foreachpair (const string& role, const Resources& resources, totalResources.reservations()) { ``` src/slave/http.cpp Lines 1344 (patched) Nit: Add one blank line below. src/tests/reservation_endpoints_tests.cpp Line 1739 (original), 1739 (patched) Nit: Add one blank line below. - haosdent huang On June 27, 2017, 5:10 p.m., Andrei Budnik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60369/ > ----------------------------------------------------------- > > (Updated June 27, 2017, 5:10 p.m.) > > > Review request for mesos, Benjamin Mahler and haosdent huang. > > > Bugs: MESOS-6441 > https://issues.apache.org/jira/browse/MESOS-6441 > > > Repository: mesos > > > Description > ------- > > The JSON key for this information is "reserved_resources_allocated" > and "unreserved_resources_allocated". > > > Diffs > ----- > > src/slave/http.cpp cbbc1dc27cc90bac8d48cbbc84266c3d87490a3c > src/tests/reservation_endpoints_tests.cpp f710a188a7875c1cb847e39276b4b65332703ca5 > > > Diff: https://reviews.apache.org/r/60369/diff/2/ > > > Testing > ------- > > make check > > > Thanks, > > Andrei Budnik > > --===============1872574851681222290==--