From reviews-return-52332-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Sat Dec 10 01:19:27 2016 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 00E7B19007 for ; Sat, 10 Dec 2016 01:19:27 +0000 (UTC) Received: (qmail 93845 invoked by uid 500); 10 Dec 2016 01:19:26 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 93814 invoked by uid 500); 10 Dec 2016 01:19:26 -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 93795 invoked by uid 99); 10 Dec 2016 01:19:26 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Dec 2016 01:19:26 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 11B332FBFCC; Sat, 10 Dec 2016 01:19:26 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6318074544161741817==" MIME-Version: 1.0 Subject: Re: Review Request 51879: Autodetect value of resource when not specified in static resources. From: Anindya Sinha To: Jiang Yan Xu Cc: Anindya Sinha , haosdent huang , Guangya Liu , mesos Date: Sat, 10 Dec 2016 01:19:26 -0000 Message-ID: <20161210011926.1680.45148@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Anindya Sinha X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/51879/ X-Sender: Anindya Sinha References: <20161025181926.9386.59266@reviews.apache.org> In-Reply-To: <20161025181926.9386.59266@reviews.apache.org> Reply-To: Anindya Sinha X-ReviewRequest-Repository: mesos --===============6318074544161741817== 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/51879/ ----------------------------------------------------------- (Updated Dec. 10, 2016, 1:19 a.m.) Review request for mesos and Jiang Yan Xu. Changes ------- Addressed review comments. Bugs: MESOS-6062 https://issues.apache.org/jira/browse/MESOS-6062 Repository: mesos Description (updated) ------- When static resources indicate resources with a positive size, we use that for the resources on the agent. However, --resources can include resources with no size, which indicates that mesos agent determine the size of those resources from the agent and uses that information. Note that auto-detection of resources is allowed for all known resource types except "gpus" (i.e. "cpus", "mem", "disk" and "ports") when represented in JSON format only. Auto-detection is not done when the resources are represented in text format. With this change, JSON representation for disk resources that do not specify any value would not result in an error, but those resources will not be accounted for until a valid size is determined for such resources. A scalar value of -1 still results in an invalid resource. Diffs (updated) ----- include/mesos/resources.hpp f569c931ff7db8d51dfd7c96f4f2addab05df85d include/mesos/v1/resources.hpp f60ab794a0c7c24885c49cc47b798c363e3279e7 src/common/resources.cpp 4bb9beffcb3509f4226b4985e05eccec01412d0f src/slave/containerizer/containerizer.cpp d46882baa904fd439bffb23c324828b777228f1c src/slave/containerizer/mesos/isolators/gpu/allocator.cpp 2e722691475c84afae14009014ea70cc0fdd0e65 src/v1/resources.cpp 46cc00f2f453f5eb4ddc4b0b9b89be2bd89f05d9 Diff: https://reviews.apache.org/r/51879/diff/ Testing ------- Tests passed. Thanks, Anindya Sinha --===============6318074544161741817==--