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 C40F0185AB for ; Sun, 3 Jan 2016 01:40:28 +0000 (UTC) Received: (qmail 42837 invoked by uid 500); 3 Jan 2016 01:40:28 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 42811 invoked by uid 500); 3 Jan 2016 01:40:28 -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 42797 invoked by uid 99); 3 Jan 2016 01:40:28 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jan 2016 01:40:28 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 2401F1CC3EF; Sun, 3 Jan 2016 01:40:27 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2517453559079104572==" MIME-Version: 1.0 Subject: Re: Review Request 41760: [WIP] Add init(const FlagsBase&) to Anonymous module From: "Marco Massenzio" To: "Anand Mazumdar" , "Kapil Arya" Cc: "Marco Massenzio" , "mesos" Date: Sun, 03 Jan 2016 01:40:27 -0000 Message-ID: <20160103014027.4181.49339@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Marco Massenzio" X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/41760/ X-Sender: "Marco Massenzio" References: <20160103013311.4182.34532@reviews.apache.org> In-Reply-To: <20160103013311.4182.34532@reviews.apache.org> Reply-To: "Marco Massenzio" X-ReviewRequest-Repository: mesos --===============2517453559079104572== 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/41760/ ----------------------------------------------------------- (Updated Jan. 3, 2016, 1:40 a.m.) Review request for mesos, Anand Mazumdar and Kapil Arya. Bugs: MESOS-4253 https://issues.apache.org/jira/browse/MESOS-4253 Repository: mesos Description ------- Jira: [MESOS-4253](https://issues.apache.org/jira/browse/MESOS-4253) To provide a basic "context" to Anonymous modules, we pass in the `BaseFlags`. This tries to be backward compatible with existing modules, so a no-op (`virtual`) implementation of the method is provided in the base class. Currently the code is only implemented in the Agent's `main()` method, but if deemed correct, adding it to Master is trivial. Diffs ----- include/mesos/module/anonymous.hpp 629eb123b9d5fa9e07ddb1c704ee72e96e8fec5b src/examples/test_anonymous_module.hpp 3da33a42f04b7421cee8fbb85e29b66e352f5894 src/examples/test_anonymous_module.cpp dd291cff3b5d47337e371cd2c1082fd6716af3fc src/slave/main.cpp 9d48a0823189ea6505073a2803f02d90dc382ab4 src/tests/anonymous_tests.cpp bc29ff8be94af82dd97f43db4f9594036705e835 src/tests/module.hpp 8e92774ddd51bc8a1368fb1cf6546300696b2d22 src/tests/module.cpp 7968519996ca9f9d8895e73d5f173d26a7e794e0 Diff: https://reviews.apache.org/r/41760/diff/ Testing (updated) ------- Unit tests pass. Also implemented in the [execute-module](http://github.com/massenz/execute-module) - and it works there too: ``` I0102 17:38:26.180788 19971 main.cpp:272] Initializing anonymous module 'com_alertavert_mesos_RemoteExecution' I0102 17:38:26.180800 19971 main.cpp:278] Sending flags to module 'com_alertavert_mesos_RemoteExecution' I0102 17:38:26.180810 19971 execute_module.hpp:129] Executing initialize() for module; parsing runtime flags I0102 17:38:26.181658 19971 execute_module.hpp:139] Configured work dir to [/tmp/agent] and Sandbox dir to [/mnt/mesos/sandbox] ``` Thanks, Marco Massenzio --===============2517453559079104572==--