----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/14669/#review27254 -----------------------------------------------------------
Also, please attach the JIRA issue to this review. include/mesos/scheduler.hpp <https://reviews.apache.org/r/14669/#comment53073> s/each offer/all offers/ include/mesos/scheduler.hpp <https://reviews.apache.org/r/14669/#comment53075> Add a TODO that this is deprecated. src/java/src/org/apache/mesos/MesosSchedulerDriver.java <https://reviews.apache.org/r/14669/#comment53076> Deprecation warning? Also, the wrapping seems to be incorrect? src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53079> Not yours, but can you kill this TODO? src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53080> new line. src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53081> s/appear/appears/ src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53082> Why do you need a hashmap? Is a hashset of OfferID not sufficient? src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53083> new line. src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53085> s/use/uses/ src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53084> new line. src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53087> I think this is abusing the visitor pattern :) Lets just do offer aggregation inline in launchTasks(), or if you prefer do it in a helper. IIUC, this helper could be used in the future when we implement 'update'. src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53088> We should send back a TASK_LOST here. src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53089> Seems odd to do these checks for only the first offer. Can we use the offer validators do these checks for each offer? src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53094> If you move the base offer checks above to offer validators, you can s/currentOffer/offer/ src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53095> This is odd. Why do it here instead of doing it in the if statement above? src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53091> This is not really invalid offer right? This is an invalid task. src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53096> This is also doesn't make much sense now that we accept multiple offers? src/master/master.cpp <https://reviews.apache.org/r/14669/#comment53090> Is reportInvalidOffers() called from anywhere else? If not, we don't need to pull it out into a helper function? - Vinod Kone On Oct. 18, 2013, 11:01 p.m., Niklas Nielsen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/14669/ > ----------------------------------------------------------- > > (Updated Oct. 18, 2013, 11:01 p.m.) > > > Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone. > > > Repository: mesos-git > > > Description > ------- > > Running tasks on more than one offer belonging to a single slave can be > useful in situations with multiple out-standing offers. > > This patch extends the usual launchTasks() to accept a vector of OfferIDs. > The previous launchTasks (accepting a single OfferID) has been kept for > backward compatibility, but this now calls the new launchTasks() with a > one-element list. > This also applied for the JNI and python interfaces, which accepts both > formats as well. > > Offers are verified to belong to the same slave and framework, before > resources are merged and used. > > > Diffs > ----- > > include/mesos/scheduler.hpp fa1ffe8 > src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 9869929 > src/java/src/org/apache/mesos/MesosSchedulerDriver.java ed4b4a3 > src/java/src/org/apache/mesos/SchedulerDriver.java 93aaa54 > src/master/master.hpp 9f5e25b > src/master/master.cpp acbb137 > src/messages/messages.proto a5dded2 > src/python/native/mesos_scheduler_driver_impl.cpp 059ed5d > src/sched/sched.cpp 824b4b7 > src/tests/master_tests.cpp bf790d2 > > Diff: https://reviews.apache.org/r/14669/diff/ > > > Testing > ------- > > Three new tests has been added: LaunchCombinedOfferTest, > LaunchAcrossSlavesTest and LaunchDuplicateOfferTest > This test ensures that: > 1) Multiple offers can be used to run a single task (requesting the sum of > offer resources). > 2) Offers cannot span multiple slaves. > 3) No offers can appear more than once in offer list. > > $ make check > ... > [ RUN ] MasterTest.LaunchCombinedOfferTest > [ OK ] MasterTest.LaunchCombinedOfferTest (2010 ms) > [ RUN ] MasterTest.LaunchAcrossSlavesTest > [ OK ] MasterTest.LaunchAcrossSlavesTest (3 ms) > [ RUN ] MasterTest.LaunchDuplicateOfferTest > [ OK ] MasterTest.LaunchDuplicateOfferTest (3 ms) > ... > > > Thanks, > > Niklas Nielsen > >