> On Feb. 27, 2017, 9:52 p.m., David McLaughlin wrote:
> > src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java, lines 
> > 96-104
> > <https://reviews.apache.org/r/57061/diff/5/?file=1650839#file1650839line96>
> >
> >     Feels like a good place to add some context from the design doc here. 
> > E.g. why do we have multiple drivers? What are the implications of using 
> > each one?

Done.


> On Feb. 27, 2017, 9:52 p.m., David McLaughlin wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/LibMesosLoadingModule.java, 
> > line 25
> > <https://reviews.apache.org/r/57061/diff/5/?file=1650840#file1650840line25>
> >
> >     Update this doc to reflect the new behavior?

Technically the new behaviour is the same.

`DriverFactoryImpl` is a wrapper around the constructor for the scheduler 
driver and we wrap around the `V0Mesos` and `V1Mesos` construtors here, just 
using lambdas instead.

We need this because all of those classes have a hard dependency on libmesos 
and load in native code in the constructor.


> On Feb. 27, 2017, 9:52 p.m., David McLaughlin wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java,
> >  lines 114-115
> > <https://reviews.apache.org/r/57061/diff/5/?file=1650845#file1650845line114>
> >
> >     Can we avoid repeating this in each method?

I tried but not really. This is why:
1. `ensureRunning` ensures the Guava service is running before we do anything. 
It is a good sanity check.
2. `blockUntilRegistered` forces callers to block until we have sucessfully 
persisted the framework id we get from mesos.

Every method that does a call needs this as a safety/sanity check. Removing 
some of these requires changing the interface and some of the callers.


> On Feb. 27, 2017, 9:52 p.m., David McLaughlin wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java,
> >  line 48
> > <https://reviews.apache.org/r/57061/diff/5/?file=1650845#file1650845line48>
> >
> >     Missing Javadoc.

Added.


> On Feb. 27, 2017, 9:52 p.m., David McLaughlin wrote:
> > src/main/java/org/apache/aurora/scheduler/mesos/MesosSchedulerImpl.java, 
> > lines 414-426
> > <https://reviews.apache.org/r/57061/diff/5/?file=1650841#file1650841line414>
> >
> >     Seems like a good place to use a CacheBuilder (to avoid the String 
> > creation per event received).
> >     
> >     Also, we don't normally initialize counters to 0. Any particular reason 
> > why it's necessary here?

Added a cache for the metric name.

We normally don't but I find that aggravating for dynamic names in a fixed 
space. It's much easier on metric systems and for operators who just curl 
`/vars` to have all of them initialized to 0 instead of having them missing.


- Zameer


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57061/#review167006
-----------------------------------------------------------


On Feb. 27, 2017, 4:43 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57061/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2017, 4:43 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin, Mehrdad Nurolahzade, and Stephan 
> Erb.
> 
> 
> Bugs: AURORA-1887 and AURORA-1888
>     https://issues.apache.org/jira/browse/AURORA-1887
>     https://issues.apache.org/jira/browse/AURORA-1888
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This patch completes the design doc[1] and enables operators to choose between
> two V1 Mesos API implementations. The first is `V0Mesos` which offers the V1 
> API
> backed by the scheduler driver and the second is `V1Mesos` which offers the V1
> API backed by a new HTTP API implementation.
> 
> There are three sets of changes in this patch.
> 
> First, the V1 Mesos code requires a Scheduler callback with a different API. 
> To
> maximize code reuse, `MesosSchedulerImpl` was extended to implement the new
> callback as well as the old callback. The code and tests were reshufled to
> maxmize logic reuse.
> 
> Second, a new driver implementation using the new API was created. All of the
> logic for the new driver is encapsulated in the
> `VersionedSchedulerDriverService` class.
> 
> Third, some wiring changes were done to allow for Guice to do it's work and
> allow for operators to select between the different driver implementations.
> 
> [1] 
> https://docs.google.com/document/d/1bWK8ldaQSsRXvdKwTh8tyR_0qMxAlnMW70eOKoU3myo
> 
> 
> Diffs
> -----
> 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> 49fdcbd8b7406a59ae7882473b9eddbfce3ece7c 
>   src/main/java/org/apache/aurora/scheduler/app/AppModule.java 
> e2ef9c30720698263106f22e3e24db5d0468b155 
>   src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
> 805e9de9bc45396cb8fc6e33ddb3d7428312c608 
>   src/main/java/org/apache/aurora/scheduler/mesos/LibMesosLoadingModule.java 
> e1a23590c795a489e753b77b0835d30d3be174b5 
>   src/main/java/org/apache/aurora/scheduler/mesos/MesosSchedulerImpl.java 
> eb210962c54cd0d33e3760b32f5b0ca1a7079204 
>   src/main/java/org/apache/aurora/scheduler/mesos/ProtosConversion.java 
> bc9e23b7410c00b7d5ffa4f23db93a51e9d0f405 
>   src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverModule.java 
> 5519323079b2c957a23e093dcc77929148b4a59a 
>   src/main/java/org/apache/aurora/scheduler/mesos/VersionedDriverFactory.java 
> PRE-CREATION 
>   
> src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
>  PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
> 05518048ca5518a007281269aa402a7d0710eb62 
>   src/test/java/org/apache/aurora/scheduler/mesos/MesosSchedulerImplTest.java 
> c599fe30bc903b3a3fb178df70a46d2421b6c45e 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
>  PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/thrift/ThriftIT.java 
> f2275c757ebfa52179e31b95bf0c02b6753fb7e3 
> 
> Diff: https://reviews.apache.org/r/57061/diff/
> 
> 
> Testing
> -------
> 
> The e2e test has been run three times, each time with a different driver 
> option.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>

Reply via email to