You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Maxim Khutornenko <ma...@apache.org> on 2014/05/14 20:49:33 UTC

Review Request 21440: Implementing parallel updater

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

Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs
-----

  src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
  src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
  src/main/python/apache/aurora/client/api/scheduler_client.py ff5d2bc52af75ff2d2eee2d9b72c8d9a0df12581 
  src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
  src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
  src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
  src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
  src/test/python/apache/aurora/client/cli/util.py 9d51a2e1fe961d4b522ac5b70f0737130326abe9 
  src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
  src/test/python/apache/aurora/client/commands/util.py fc9e2f17537e1e731381b825ac4b5646e5130654 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
  src/test/sh/org/apache/aurora/e2e/flask/flask_example.aurora ad5aafec1f796baef766ed12b2a597f26997d5b3 
  src/test/sh/org/apache/aurora/e2e/flask/flask_example_updated.aurora 6d54463c349699946c2063385b1bd38a0f8c9e58 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh c8fa07a5426c6c7748412062c26996b84637efb3 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 3c4165c8464b42f7f5dc4f94a079ff7c3086cdbc 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.

> On May 14, 2014, 7:20 p.m., Mark Chu-Carroll wrote:
> > src/test/python/apache/aurora/client/api/test_updater.py, line 126
> > <https://reviews.apache.org/r/21440/diff/1/?file=581731#file581731line126>
> >
> >     Doesn't this mean that the test will be running with just one thread? That will serialize everything, which will mask a lot of potential error cases.

Correct. All unit tests are using a single worker thread to ensure verifiability. This covers the majority of the updater mechanics with real concurrency covered by e2e tests and runtime verification. Having multiple worker threads would require a huge test-rewriting effort and would result in a potential loss of coverage and flakiness. I would rather not do that and defer concurrency testing to runtime given that it's impossible to exhaustively cover all threading edge cases with mock unit tests.


> On May 14, 2014, 7:20 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 357
> > <https://reviews.apache.org/r/21440/diff/1/?file=581729#file581729line357>
> >
> >     What is this supposed to return?

Fixed here and in other places.


> On May 14, 2014, 7:20 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 325
> > <https://reviews.apache.org/r/21440/diff/1/?file=581729#file581729line325>
> >
> >     It took me several readthroughs to figure out what this was doing. Is there maybe a clearer way of writing this?

All other ideas I can come up with result in more code. Any ideas?


> On May 14, 2014, 7:20 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 237
> > <https://reviews.apache.org/r/21440/diff/1/?file=581729#file581729line237>
> >
> >     Why?

See reply to Brian.


> On May 14, 2014, 7:20 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/instance_watcher.py, line 127
> > <https://reviews.apache.org/r/21440/diff/1/?file=581726#file581726line127>
> >
> >     Doc comment please. It's not clear reading this just what "terminating" or "terminate" means. It would be a huge help to just put a couple of words here.

Done.


- Maxim


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


On May 14, 2014, 6:49 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 14, 2014, 6:49 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py ff5d2bc52af75ff2d2eee2d9b72c8d9a0df12581 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py 9d51a2e1fe961d4b522ac5b70f0737130326abe9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py fc9e2f17537e1e731381b825ac4b5646e5130654 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example.aurora ad5aafec1f796baef766ed12b2a597f26997d5b3 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example_updated.aurora 6d54463c349699946c2063385b1bd38a0f8c9e58 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh c8fa07a5426c6c7748412062c26996b84637efb3 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 3c4165c8464b42f7f5dc4f94a079ff7c3086cdbc 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/#review43004
-----------------------------------------------------------



src/main/python/apache/aurora/client/api/instance_watcher.py
<https://reviews.apache.org/r/21440/#comment76988>

    Doc comment please. It's not clear reading this just what "terminating" or "terminate" means. It would be a huge help to just put a couple of words here.



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment76989>

    Why?



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment76990>

    It took me several readthroughs to figure out what this was doing. Is there maybe a clearer way of writing this? 



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment76992>

    What is this supposed to return?



src/test/python/apache/aurora/client/api/test_updater.py
<https://reviews.apache.org/r/21440/#comment76995>

    Doesn't this mean that the test will be running with just one thread? That will serialize everything, which will mask a lot of potential error cases.


- Mark Chu-Carroll


On May 14, 2014, 2:49 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 14, 2014, 2:49 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py ff5d2bc52af75ff2d2eee2d9b72c8d9a0df12581 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py 9d51a2e1fe961d4b522ac5b70f0737130326abe9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py fc9e2f17537e1e731381b825ac4b5646e5130654 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example.aurora ad5aafec1f796baef766ed12b2a597f26997d5b3 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example_updated.aurora 6d54463c349699946c2063385b1bd38a0f8c9e58 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh c8fa07a5426c6c7748412062c26996b84637efb3 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 3c4165c8464b42f7f5dc4f94a079ff7c3086cdbc 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.

> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 58
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line58>
> >
> >     This could be clearer with a bit of rephrasing in the comment:
> >     
> >     "A thread that than helps with unhandled exceptions by re-raising errors with the parent thread upon completion."
> >

Done.


> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 114
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line114>
> >
> >     I spent a bunch of time working through how this thing is doing threading/multiplexing. It's not actually complicated, but it's hard to follow if you're not familiar with the code. Documentation would be a huge help:
> >     
> >     "This method is the main body of the multiplexer thread. It repeatedly polls the
> >     worker queue for new calls, and then dispatches them in batches to the scheduler. Callers are notified when their requests complete."

Done.


> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 125
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line125>
> >
> >     """Takes a set of RPC requests grouped by command type, dispatches them to the scheduler, and then waits for the batched calls to complete. When a call is completed, its callers will be notified via the completion queue"""

Done.


> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 140
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line140>
> >
> >     I have no idea what this sentence means.
> >

Dropped.


> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 162
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line162>
> >
> >     Missing whitespace?

where?


> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 156
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line156>
> >
> >     It took me three attempts to parse this; I kept reading it as "in parallel with (the number of threads) limited by (batch size)"
> >     
> >     
> >     "Performs an update command using a collection of parallel threads. The number of parallel threads used is determined by the batch size parameter."

Done.


> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 169
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line169>
> >
> >     A doc comment explaining the parameters is really needed here.
> >

Documenting initializer parameters does not seem to be a common practice under api. Besides, almost all of the parameters are for unit testing purposes and normally are not expected to be specified.


> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 192
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line192>
> >
> >     Not sure I understand the point of this FailureThreshold object. It's just a partial view on an UpdateConfig, isn't it? Copying the fields just adds more indirection to the code, which is obscuring things. Better to pass the UpdateConfig; then it's immediately clear where these parameters are coming from.
> >

Not sure what you proposal is. The FailureThreashold is a mutable custom class defined alongside the UpdateConfig to track failure counts. Don't see any benefit in coupling the two.


> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 205
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line205>
> >
> >     "acquiring a lock"

I actually prefer the current wording as it highlights the exclusive nature of the lock.


> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 234
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line234>
> >
> >     "using a" better than "with the"

Done.


> On May 20, 2014, 8:04 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 334
> > <https://reviews.apache.org/r/21440/diff/2/?file=582780#file582780line334>
> >
> >     I'd really prefer to see the actual logic of a single-instance update be a distinct method from the threading logic of pulling from queues.

Why? It just doubles the number of methods and dissolves the algorithm idea. This is the updater thread target method and I'd prefer to package all relevant things together.


- Maxim


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


On May 15, 2014, 10:52 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 15, 2014, 10:52 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py ff5d2bc52af75ff2d2eee2d9b72c8d9a0df12581 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 09dda3bed6a5097f6dff8153249a7460a5b24d58 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3df042019d845421e5c8d79232ed865e342d44fc 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_create.py ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
>   src/test/python/apache/aurora/client/cli/test_kill.py 3c8e72de5e04b3c7dc769579506dca750b1f3089 
>   src/test/python/apache/aurora/client/cli/test_restart.py 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
>   src/test/python/apache/aurora/client/commands/test_create.py 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
>   src/test/python/apache/aurora/client/commands/test_kill.py bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
>   src/test/python/apache/aurora/client/commands/test_restart.py 18e90aa8731798daac5fb5700807ebe2eb794cf9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py 4e587f320c785b56f5812364d50946cb2b6f03dc 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example.aurora ad5aafec1f796baef766ed12b2a597f26997d5b3 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example_updated.aurora 6d54463c349699946c2063385b1bd38a0f8c9e58 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh c8fa07a5426c6c7748412062c26996b84637efb3 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 3c4165c8464b42f7f5dc4f94a079ff7c3086cdbc 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/#review43523
-----------------------------------------------------------



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77715>

    This could be clearer with a bit of rephrasing in the comment:
    
    "A thread that than helps with unhandled exceptions by re-raising errors with the parent thread upon completion."
    



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77717>

    I spent a bunch of time working through how this thing is doing threading/multiplexing. It's not actually complicated, but it's hard to follow if you're not familiar with the code. Documentation would be a huge help:
    
    "This method is the main body of the multiplexer thread. It repeatedly polls the
    worker queue for new calls, and then dispatches them in batches to the scheduler. Callers are notified when their requests complete."



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77718>

    """Takes a set of RPC requests grouped by command type, dispatches them to the scheduler, and then waits for the batched calls to complete. When a call is completed, its callers will be notified via the completion queue"""



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77716>

    I have no idea what this sentence means.
    



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77719>

    It took me three attempts to parse this; I kept reading it as "in parallel with (the number of threads) limited by (batch size)"
    
    
    "Performs an update command using a collection of parallel threads. The number of parallel threads used is determined by the batch size parameter."



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77720>

    Missing whitespace?



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77721>

    A doc comment explaining the parameters is really needed here.
    



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77722>

    Not sure I understand the point of this FailureThreshold object. It's just a partial view on an UpdateConfig, isn't it? Copying the fields just adds more indirection to the code, which is obscuring things. Better to pass the UpdateConfig; then it's immediately clear where these parameters are coming from.
    



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77723>

    "acquiring a lock"



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77724>

    "using a" better than "with the"



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77725>

    I'd really prefer to see the actual logic of a single-instance update be a distinct method from the threading logic of pulling from queues.


- Mark Chu-Carroll


On May 15, 2014, 6:52 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 15, 2014, 6:52 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py ff5d2bc52af75ff2d2eee2d9b72c8d9a0df12581 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 09dda3bed6a5097f6dff8153249a7460a5b24d58 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3df042019d845421e5c8d79232ed865e342d44fc 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_create.py ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
>   src/test/python/apache/aurora/client/cli/test_kill.py 3c8e72de5e04b3c7dc769579506dca750b1f3089 
>   src/test/python/apache/aurora/client/cli/test_restart.py 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
>   src/test/python/apache/aurora/client/commands/test_create.py 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
>   src/test/python/apache/aurora/client/commands/test_kill.py bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
>   src/test/python/apache/aurora/client/commands/test_restart.py 18e90aa8731798daac5fb5700807ebe2eb794cf9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py 4e587f320c785b56f5812364d50946cb2b6f03dc 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example.aurora ad5aafec1f796baef766ed12b2a597f26997d5b3 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example_updated.aurora 6d54463c349699946c2063385b1bd38a0f8c9e58 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh c8fa07a5426c6c7748412062c26996b84637efb3 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 3c4165c8464b42f7f5dc4f94a079ff7c3086cdbc 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/#review43522
-----------------------------------------------------------


Ping Brian, Mark.

- Maxim Khutornenko


On May 15, 2014, 10:52 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 15, 2014, 10:52 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py ff5d2bc52af75ff2d2eee2d9b72c8d9a0df12581 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 09dda3bed6a5097f6dff8153249a7460a5b24d58 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3df042019d845421e5c8d79232ed865e342d44fc 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_create.py ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
>   src/test/python/apache/aurora/client/cli/test_kill.py 3c8e72de5e04b3c7dc769579506dca750b1f3089 
>   src/test/python/apache/aurora/client/cli/test_restart.py 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
>   src/test/python/apache/aurora/client/commands/test_create.py 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
>   src/test/python/apache/aurora/client/commands/test_kill.py bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
>   src/test/python/apache/aurora/client/commands/test_restart.py 18e90aa8731798daac5fb5700807ebe2eb794cf9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py 4e587f320c785b56f5812364d50946cb2b6f03dc 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example.aurora ad5aafec1f796baef766ed12b2a597f26997d5b3 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example_updated.aurora 6d54463c349699946c2063385b1bd38a0f8c9e58 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh c8fa07a5426c6c7748412062c26996b84637efb3 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 3c4165c8464b42f7f5dc4f94a079ff7c3086cdbc 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/#review43979
-----------------------------------------------------------


Ping Brian, Mark.

- Maxim Khutornenko


On May 23, 2014, 1:19 a.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 23, 2014, 1:19 a.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py df9d7e0a170271298137e4279221f271d355e9c5 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 09dda3bed6a5097f6dff8153249a7460a5b24d58 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3df042019d845421e5c8d79232ed865e342d44fc 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_create.py ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
>   src/test/python/apache/aurora/client/cli/test_kill.py 3c8e72de5e04b3c7dc769579506dca750b1f3089 
>   src/test/python/apache/aurora/client/cli/test_restart.py 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
>   src/test/python/apache/aurora/client/commands/test_create.py 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
>   src/test/python/apache/aurora/client/commands/test_kill.py bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
>   src/test/python/apache/aurora/client/commands/test_restart.py 18e90aa8731798daac5fb5700807ebe2eb794cf9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py 4e587f320c785b56f5812364d50946cb2b6f03dc 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 2b546f116446694eb7b0d772ae864d6d83012573 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 9b4a00bf54123fdbcf3f215e38e9807d17719d35 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Brian Wickman <wi...@apache.org>.

> On May 27, 2014, 6:38 p.m., Brian Wickman wrote:
> > src/test/python/apache/aurora/client/api/test_instance_watcher.py, line 19
> > <https://reviews.apache.org/r/21440/diff/4/?file=588632#file588632line19>
> >
> >     I don't think we can rely upon patching or subclassing _Event (an internal implementation detail) for testing.  it'd be better to just create duck-typed ClockEvent and NoWaitEvent with .wait and .is_set methods.  these probably belong in twitter.common.testing but can be created a la carte for now.
> >     
> >     mba=science=; python3
> >     Python 3.3.3 (default, Apr 15 2014, 11:17:36) 
> >     [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin
> >     Type "help", "copyright", "credits" or "license" for more information.
> >     >>> from threading import _Event
> >     Traceback (most recent call last):
> >       File "<stdin>", line 1, in <module>
> >     ImportError: cannot import name _Event
> >     >>> 
> >
> 
> Maxim Khutornenko wrote:
>     Done for the fakes. I was not able to make patch work with threading.Event though no matter what I tried (side_effect, return_value and etc.). Dropped a TODO to investigate a possible solution.

can you file a JIRA and add it to the TODO?


- Brian


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


On May 30, 2014, 10:08 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 30, 2014, 10:08 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
>   src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 7be974eb91089f776656ce65b64ee6d8c5b46394 
>   src/main/python/apache/aurora/client/api/updater.py ea7285a75020a47142e1761c7ed455cdc838e37c 
>   src/main/python/apache/aurora/client/api/updater_util.py 04105de8fb2ce1cab049eb06fd313a43bdcd28db 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py b2d0c804ae2b2095d8d2a99ea42f4da06041cec8 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 665db74475f4828af2050e98e20bbb3b1b29cf0c 
>   src/test/python/apache/aurora/client/api/test_updater.py ba783da7c0d93bb0bfd03809f62ddcad3f98cd0a 
>   src/test/python/apache/aurora/client/cli/test_create.py b186b52416a2fae8de28fd1d21e7eec07fea8e55 
>   src/test/python/apache/aurora/client/cli/test_kill.py 666ec3aa0745191aa1395e47728343cd0eda7115 
>   src/test/python/apache/aurora/client/cli/test_restart.py 50acc09491ac21935af78499ad66726df5a8f2ff 
>   src/test/python/apache/aurora/client/cli/test_update.py a2abc5eb0f11f9bc563f4504c93fcf5b7520d141 
>   src/test/python/apache/aurora/client/cli/util.py dac4928111200136a9987c9622087e8cdca7f2d2 
>   src/test/python/apache/aurora/client/commands/test_create.py 75f068250b31b656c9c87a6aa66872fbb777b0c0 
>   src/test/python/apache/aurora/client/commands/test_kill.py 3e2ac1fcea301f0ae986b61d9851d10e86996a20 
>   src/test/python/apache/aurora/client/commands/test_restart.py 6e0159f134388a251cb44cd700102d05467a9062 
>   src/test/python/apache/aurora/client/commands/test_update.py c5afbd33d1b2f82e9603c93b967fbc942c0952d7 
>   src/test/python/apache/aurora/client/commands/util.py 84784171816797f3a4fa4c5238d19b626e68ff44 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.

> On May 27, 2014, 6:38 p.m., Brian Wickman wrote:
> > src/test/python/apache/aurora/client/api/test_instance_watcher.py, line 19
> > <https://reviews.apache.org/r/21440/diff/4/?file=588632#file588632line19>
> >
> >     I don't think we can rely upon patching or subclassing _Event (an internal implementation detail) for testing.  it'd be better to just create duck-typed ClockEvent and NoWaitEvent with .wait and .is_set methods.  these probably belong in twitter.common.testing but can be created a la carte for now.
> >     
> >     mba=science=; python3
> >     Python 3.3.3 (default, Apr 15 2014, 11:17:36) 
> >     [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin
> >     Type "help", "copyright", "credits" or "license" for more information.
> >     >>> from threading import _Event
> >     Traceback (most recent call last):
> >       File "<stdin>", line 1, in <module>
> >     ImportError: cannot import name _Event
> >     >>> 
> >
> 
> Maxim Khutornenko wrote:
>     Done for the fakes. I was not able to make patch work with threading.Event though no matter what I tried (side_effect, return_value and etc.). Dropped a TODO to investigate a possible solution.
> 
> Brian Wickman wrote:
>     can you file a JIRA and add it to the TODO?

Sure, done.


- Maxim


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


On May 30, 2014, 10:08 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 30, 2014, 10:08 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
>   src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 7be974eb91089f776656ce65b64ee6d8c5b46394 
>   src/main/python/apache/aurora/client/api/updater.py ea7285a75020a47142e1761c7ed455cdc838e37c 
>   src/main/python/apache/aurora/client/api/updater_util.py 04105de8fb2ce1cab049eb06fd313a43bdcd28db 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py b2d0c804ae2b2095d8d2a99ea42f4da06041cec8 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 665db74475f4828af2050e98e20bbb3b1b29cf0c 
>   src/test/python/apache/aurora/client/api/test_updater.py ba783da7c0d93bb0bfd03809f62ddcad3f98cd0a 
>   src/test/python/apache/aurora/client/cli/test_create.py b186b52416a2fae8de28fd1d21e7eec07fea8e55 
>   src/test/python/apache/aurora/client/cli/test_kill.py 666ec3aa0745191aa1395e47728343cd0eda7115 
>   src/test/python/apache/aurora/client/cli/test_restart.py 50acc09491ac21935af78499ad66726df5a8f2ff 
>   src/test/python/apache/aurora/client/cli/test_update.py a2abc5eb0f11f9bc563f4504c93fcf5b7520d141 
>   src/test/python/apache/aurora/client/cli/util.py dac4928111200136a9987c9622087e8cdca7f2d2 
>   src/test/python/apache/aurora/client/commands/test_create.py 75f068250b31b656c9c87a6aa66872fbb777b0c0 
>   src/test/python/apache/aurora/client/commands/test_kill.py 3e2ac1fcea301f0ae986b61d9851d10e86996a20 
>   src/test/python/apache/aurora/client/commands/test_restart.py 6e0159f134388a251cb44cd700102d05467a9062 
>   src/test/python/apache/aurora/client/commands/test_update.py c5afbd33d1b2f82e9603c93b967fbc942c0952d7 
>   src/test/python/apache/aurora/client/commands/util.py 84784171816797f3a4fa4c5238d19b626e68ff44 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.

> On May 27, 2014, 6:38 p.m., Brian Wickman wrote:
> > src/test/python/apache/aurora/client/api/test_instance_watcher.py, line 19
> > <https://reviews.apache.org/r/21440/diff/4/?file=588632#file588632line19>
> >
> >     I don't think we can rely upon patching or subclassing _Event (an internal implementation detail) for testing.  it'd be better to just create duck-typed ClockEvent and NoWaitEvent with .wait and .is_set methods.  these probably belong in twitter.common.testing but can be created a la carte for now.
> >     
> >     mba=science=; python3
> >     Python 3.3.3 (default, Apr 15 2014, 11:17:36) 
> >     [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin
> >     Type "help", "copyright", "credits" or "license" for more information.
> >     >>> from threading import _Event
> >     Traceback (most recent call last):
> >       File "<stdin>", line 1, in <module>
> >     ImportError: cannot import name _Event
> >     >>> 
> >

Done for the fakes. I was not able to make patch work with threading.Event though no matter what I tried (side_effect, return_value and etc.). Dropped a TODO to investigate a possible solution.


- Maxim


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


On May 23, 2014, 1:19 a.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 23, 2014, 1:19 a.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py df9d7e0a170271298137e4279221f271d355e9c5 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 09dda3bed6a5097f6dff8153249a7460a5b24d58 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3df042019d845421e5c8d79232ed865e342d44fc 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_create.py ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
>   src/test/python/apache/aurora/client/cli/test_kill.py 3c8e72de5e04b3c7dc769579506dca750b1f3089 
>   src/test/python/apache/aurora/client/cli/test_restart.py 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
>   src/test/python/apache/aurora/client/commands/test_create.py 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
>   src/test/python/apache/aurora/client/commands/test_kill.py bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
>   src/test/python/apache/aurora/client/commands/test_restart.py 18e90aa8731798daac5fb5700807ebe2eb794cf9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py 4e587f320c785b56f5812364d50946cb2b6f03dc 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 2b546f116446694eb7b0d772ae864d6d83012573 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 9b4a00bf54123fdbcf3f215e38e9807d17719d35 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Brian Wickman <wi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/#review44016
-----------------------------------------------------------



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment78260>

    pydoc style nit, they should be:
    
    '''one-liner description
    
    multi-line elaboration of
    features go here.'''
    
    e.g.
    
    '''main body of the multiplexer thread.
    
    This method repeatedly polls the worker queue for new calls...'''
    



src/test/python/apache/aurora/client/api/test_instance_watcher.py
<https://reviews.apache.org/r/21440/#comment78265>

    I don't think we can rely upon patching or subclassing _Event (an internal implementation detail) for testing.  it'd be better to just create duck-typed ClockEvent and NoWaitEvent with .wait and .is_set methods.  these probably belong in twitter.common.testing but can be created a la carte for now.
    
    mba=science=; python3
    Python 3.3.3 (default, Apr 15 2014, 11:17:36) 
    [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from threading import _Event
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: cannot import name _Event
    >>> 
    


- Brian Wickman


On May 23, 2014, 1:19 a.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 23, 2014, 1:19 a.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py df9d7e0a170271298137e4279221f271d355e9c5 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 09dda3bed6a5097f6dff8153249a7460a5b24d58 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3df042019d845421e5c8d79232ed865e342d44fc 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_create.py ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
>   src/test/python/apache/aurora/client/cli/test_kill.py 3c8e72de5e04b3c7dc769579506dca750b1f3089 
>   src/test/python/apache/aurora/client/cli/test_restart.py 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
>   src/test/python/apache/aurora/client/commands/test_create.py 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
>   src/test/python/apache/aurora/client/commands/test_kill.py bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
>   src/test/python/apache/aurora/client/commands/test_restart.py 18e90aa8731798daac5fb5700807ebe2eb794cf9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py 4e587f320c785b56f5812364d50946cb2b6f03dc 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 2b546f116446694eb7b0d772ae864d6d83012573 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 9b4a00bf54123fdbcf3f215e38e9807d17719d35 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/#review43982
-----------------------------------------------------------

Ship it!


Ship It!

- Mark Chu-Carroll


On May 22, 2014, 9:19 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 22, 2014, 9:19 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py df9d7e0a170271298137e4279221f271d355e9c5 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 09dda3bed6a5097f6dff8153249a7460a5b24d58 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3df042019d845421e5c8d79232ed865e342d44fc 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_create.py ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
>   src/test/python/apache/aurora/client/cli/test_kill.py 3c8e72de5e04b3c7dc769579506dca750b1f3089 
>   src/test/python/apache/aurora/client/cli/test_restart.py 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
>   src/test/python/apache/aurora/client/commands/test_create.py 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
>   src/test/python/apache/aurora/client/commands/test_kill.py bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
>   src/test/python/apache/aurora/client/commands/test_restart.py 18e90aa8731798daac5fb5700807ebe2eb794cf9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py 4e587f320c785b56f5812364d50946cb2b6f03dc 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 2b546f116446694eb7b0d772ae864d6d83012573 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 9b4a00bf54123fdbcf3f215e38e9807d17719d35 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Brian Wickman <wi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/#review44989
-----------------------------------------------------------

Ship it!


Ship It!

- Brian Wickman


On June 6, 2014, 5:55 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated June 6, 2014, 5:55 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
>   src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
>   src/main/python/apache/aurora/client/api/updater.py de7912ce10f04d9e4c73faac4198741f47189258 
>   src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
>   src/test/python/apache/aurora/client/api/test_updater.py 0ee342c848e15666d34fd38d3cd22574b9346ee3 
>   src/test/python/apache/aurora/client/cli/test_create.py 224adc31c8a4a32c55384359d319d0fa6bef4f19 
>   src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
>   src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
>   src/test/python/apache/aurora/client/cli/test_update.py 08be49e81f190822dca80f3728845138d341574b 
>   src/test/python/apache/aurora/client/cli/util.py 070718caaf912374f00fa89fdb9266ab95b3c483 
>   src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
>   src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
>   src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
>   src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
>   src/test/python/apache/aurora/client/commands/util.py 84784171816797f3a4fa4c5238d19b626e68ff44 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated July 23, 2014, 5:05 p.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

Rebasing.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
  src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/instance_watcher.py d2ad6fde52316cd43429952ce862b3c023a9697f 
  src/main/python/apache/aurora/client/api/job_monitor.py 6c26cb95372cc654b415d2480e366e7673446384 
  src/main/python/apache/aurora/client/api/scheduler_client.py e9111354e6fe61d33dd70acea6345b369516ffd2 
  src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/sla.py 50befea298e1a0cd0cb2178ae22d86d6522a75bd 
  src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
  src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
  src/main/python/apache/aurora/client/base.py 663a2471ccb53efc80e9918a26c324475ee50938 
  src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 93b43e8e2f9ffa3477b3f311a94476579a530d8f 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 3cc876f4fc02420e418d3cf524761c3736884fed 
  src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
  src/test/python/apache/aurora/client/cli/test_create.py af548ae54ac270679ba7b34d998ea95c05f5b640 
  src/test/python/apache/aurora/client/cli/test_kill.py 48badec1996db0d9fe537234253258e44dda6ebe 
  src/test/python/apache/aurora/client/cli/test_restart.py e85951a1a7e86887a524529748e9e3cdd1e02749 
  src/test/python/apache/aurora/client/cli/test_update.py c6440e4469d4eea895feb91cb7dcde343388e2cc 
  src/test/python/apache/aurora/client/cli/util.py fb849f0f34e3fc1c9685953fcb094e5f4af874c0 
  src/test/python/apache/aurora/client/commands/test_create.py b8df1f2daab95ac83461d706ec5c27daddfcd220 
  src/test/python/apache/aurora/client/commands/test_kill.py 642ee64a903dbd040e3e94a3600448ed5da7f5a3 
  src/test/python/apache/aurora/client/commands/test_restart.py b95e7ffe77432f3c6492bcfad1ea71f5a41ddb53 
  src/test/python/apache/aurora/client/commands/test_update.py 114ac01d0579b494c914d3af3fc581b9c1d632e5 
  src/test/python/apache/aurora/client/commands/util.py e24f130234a431969d6f52233e9b7fa9297bbaa4 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 664c3e3c27a58d64d73ac8c9066bf4dc721415ad 
  src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora dcf61033743317a51dd2f77e8d254c4781cb6a93 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Brian Wickman <wi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/#review48459
-----------------------------------------------------------

Ship it!


Ship It!

- Brian Wickman


On July 21, 2014, 9:09 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated July 21, 2014, 9:09 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
>   src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
>   src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 10a956c50de893c8380ef1f763ed7d6686b5c00c 
>   src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/sla.py 8fc9af329a726087c0f93fae975298e042c25d8b 
>   src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
>   src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
>   src/main/python/apache/aurora/client/base.py 663a2471ccb53efc80e9918a26c324475ee50938 
>   src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
>   src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
>   src/test/python/apache/aurora/client/cli/test_create.py cda95ceca4803cb39ad1c2b2bebddc5fba61d145 
>   src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
>   src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
>   src/test/python/apache/aurora/client/cli/test_update.py 44a180e88893fea1d7acf1862d5aaa95d98598f5 
>   src/test/python/apache/aurora/client/cli/util.py 65e679fbfad421ce3373e07d01e8619b5f10af5b 
>   src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
>   src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
>   src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
>   src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
>   src/test/python/apache/aurora/client/commands/util.py e24f130234a431969d6f52233e9b7fa9297bbaa4 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 664c3e3c27a58d64d73ac8c9066bf4dc721415ad 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora dcf61033743317a51dd2f77e8d254c4781cb6a93 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated July 21, 2014, 9:09 p.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

Rebased. Brian, is this fully addressing your latest comments?


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
  src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
  src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
  src/main/python/apache/aurora/client/api/scheduler_client.py 10a956c50de893c8380ef1f763ed7d6686b5c00c 
  src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/sla.py 8fc9af329a726087c0f93fae975298e042c25d8b 
  src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
  src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
  src/main/python/apache/aurora/client/base.py 663a2471ccb53efc80e9918a26c324475ee50938 
  src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
  src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
  src/test/python/apache/aurora/client/cli/test_create.py cda95ceca4803cb39ad1c2b2bebddc5fba61d145 
  src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
  src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
  src/test/python/apache/aurora/client/cli/test_update.py 44a180e88893fea1d7acf1862d5aaa95d98598f5 
  src/test/python/apache/aurora/client/cli/util.py 65e679fbfad421ce3373e07d01e8619b5f10af5b 
  src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
  src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
  src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
  src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
  src/test/python/apache/aurora/client/commands/util.py e24f130234a431969d6f52233e9b7fa9297bbaa4 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 664c3e3c27a58d64d73ac8c9066bf4dc721415ad 
  src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora dcf61033743317a51dd2f77e8d254c4781cb6a93 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated June 27, 2014, 7:58 p.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

CR comments.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
  src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
  src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
  src/main/python/apache/aurora/client/api/scheduler_client.py 10a956c50de893c8380ef1f763ed7d6686b5c00c 
  src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/sla.py 8fc9af329a726087c0f93fae975298e042c25d8b 
  src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
  src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
  src/main/python/apache/aurora/client/base.py 663a2471ccb53efc80e9918a26c324475ee50938 
  src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
  src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
  src/test/python/apache/aurora/client/cli/test_create.py b9313be657ebaf9c79a7695b75abe2d90a7d75dd 
  src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
  src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
  src/test/python/apache/aurora/client/cli/test_update.py 44a180e88893fea1d7acf1862d5aaa95d98598f5 
  src/test/python/apache/aurora/client/cli/util.py a2c9d09c58243250baefab20000ee51f5ea3b411 
  src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
  src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
  src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
  src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
  src/test/python/apache/aurora/client/commands/util.py e24f130234a431969d6f52233e9b7fa9297bbaa4 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 664c3e3c27a58d64d73ac8c9066bf4dc721415ad 
  src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora dcf61033743317a51dd2f77e8d254c4781cb6a93 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated June 27, 2014, 6:36 p.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

CR comments.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
  src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
  src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
  src/main/python/apache/aurora/client/api/scheduler_client.py 10a956c50de893c8380ef1f763ed7d6686b5c00c 
  src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/sla.py 8fc9af329a726087c0f93fae975298e042c25d8b 
  src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
  src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
  src/main/python/apache/aurora/client/base.py 663a2471ccb53efc80e9918a26c324475ee50938 
  src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
  src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
  src/test/python/apache/aurora/client/cli/test_create.py b9313be657ebaf9c79a7695b75abe2d90a7d75dd 
  src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
  src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
  src/test/python/apache/aurora/client/cli/test_update.py 44a180e88893fea1d7acf1862d5aaa95d98598f5 
  src/test/python/apache/aurora/client/cli/util.py a2c9d09c58243250baefab20000ee51f5ea3b411 
  src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
  src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
  src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
  src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
  src/test/python/apache/aurora/client/commands/util.py e24f130234a431969d6f52233e9b7fa9297bbaa4 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 664c3e3c27a58d64d73ac8c9066bf4dc721415ad 
  src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora dcf61033743317a51dd2f77e8d254c4781cb6a93 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.

> On June 25, 2014, 10:44 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/instance_watcher.py, line 48
> > <https://reviews.apache.org/r/21440/diff/7-9/?file=604778#file604778line48>
> >
> >     this should be terminating_event=None
> >     
> >     and self._terminating = terminating_event or Event()
> >     
> >     otherwise you have a shared singleton Event object across all InstaceWatchers which is probably not what you want

I actually always need it as it's now being used to wait on instead of _clock.sleep() (line 128). 


> On June 25, 2014, 10:44 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/job_monitor.py, line 39
> > <https://reviews.apache.org/r/21440/diff/7-9/?file=604779#file604779line39>
> >
> >     same comment re:Event

Same here. It's now a required part of the job_monitor.


> On June 25, 2014, 10:44 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/scheduler_mux.py, line 122
> > <https://reviews.apache.org/r/21440/diff/9/?file=616435#file616435line122>
> >
> >     it's more idiomatic/consistent with the rest of the codebase to make Error be inside the class, i.e.
> >     
> >     class SchedulerMux(object):
> >       class Error(Exception): pass
> >     
> >     then raising self.Error

Sure, done.


> On June 25, 2014, 10:44 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/task_util.py, lines 41-46
> > <https://reviews.apache.org/r/21440/diff/9/?file=616436#file616436line41>
> >
> >     inline the returns, e.g.
> >     
> >     if self._scheduler_mux:
> >        return ...
> >     else:
> >        return ...

Done.


> On June 25, 2014, 10:44 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/task_util.py, line 52
> > <https://reviews.apache.org/r/21440/diff/9/?file=616436#file616436line52>
> >
> >     not optional unless you do something like instance_ids=None in the defn
> >     
> >     then furthermore you can be a little more specific in the include_ids method
> >     
> >     include_ids = lambda id: id in instance_ids if instance_ids is not None else True

Fixed.


> On June 25, 2014, 10:44 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/task_util.py, lines 90-91
> > <https://reviews.apache.org/r/21440/diff/9/?file=616436#file616436line90>
> >
> >     this is copypasta from apache/aurora/client/base.py -- maybe add a format_response method there so that you can just do log.debug(format_response(resp))
> >     
> >

Makes sense. Done.


> On June 25, 2014, 10:44 p.m., Brian Wickman wrote:
> > src/test/python/apache/aurora/client/api/test_scheduler_mux.py, line 68
> > <https://reviews.apache.org/r/21440/diff/9/?file=616442#file616442line68>
> >
> >     Amount(1, Time.MILLISECONDS) to make this faster

This is testing queue.get() timeout, which is set in seconds. Tried and it did not make anything faster.


> On June 25, 2014, 10:44 p.m., Brian Wickman wrote:
> > src/test/python/apache/aurora/client/api/test_task_util.py, lines 48-50
> > <https://reviews.apache.org/r/21440/diff/9/?file=616443#file616443line48>
> >
> >     why the def create_task?  the following is <100:
> >     
> >     return [ScheduledTask(assignedTask=AssignedTask(instanceId=index)) for index in cls.INSTANCES]

It used to be longer. I swear! 


- Maxim


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


On June 24, 2014, 11:28 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated June 24, 2014, 11:28 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
>   src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
>   src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 10a956c50de893c8380ef1f763ed7d6686b5c00c 
>   src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
>   src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
>   src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
>   src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
>   src/test/python/apache/aurora/client/cli/test_create.py b9313be657ebaf9c79a7695b75abe2d90a7d75dd 
>   src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
>   src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
>   src/test/python/apache/aurora/client/cli/test_update.py 44a180e88893fea1d7acf1862d5aaa95d98598f5 
>   src/test/python/apache/aurora/client/cli/util.py a2c9d09c58243250baefab20000ee51f5ea3b411 
>   src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
>   src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
>   src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
>   src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
>   src/test/python/apache/aurora/client/commands/util.py b1822f27d2890469efefc5bfa0878f29163c167a 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.

> On June 25, 2014, 10:44 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/instance_watcher.py, line 48
> > <https://reviews.apache.org/r/21440/diff/7-9/?file=604778#file604778line48>
> >
> >     this should be terminating_event=None
> >     
> >     and self._terminating = terminating_event or Event()
> >     
> >     otherwise you have a shared singleton Event object across all InstaceWatchers which is probably not what you want
> 
> Maxim Khutornenko wrote:
>     I actually always need it as it's now being used to wait on instead of _clock.sleep() (line 128).
> 
> Brian Wickman wrote:
>     i'm not saying to remove the terminating_event.  what I'm saying is that "terminating_event=Event()" in the constructor constructs a global singleton that all instantiations of the instance watcher will use, which is not what you want.  instead you should do terminating_event=None in the constructor, then assign self._terminating_event = terminating_event or Event() (translation: use the one passed in, or if None is passed in, create a new one for the user, instead of using a global singleton.)

Ah, misunderstood. Makes total sense now, thanks.


- Maxim


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


On June 27, 2014, 6:36 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated June 27, 2014, 6:36 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
>   src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
>   src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 10a956c50de893c8380ef1f763ed7d6686b5c00c 
>   src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/sla.py 8fc9af329a726087c0f93fae975298e042c25d8b 
>   src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
>   src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
>   src/main/python/apache/aurora/client/base.py 663a2471ccb53efc80e9918a26c324475ee50938 
>   src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
>   src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
>   src/test/python/apache/aurora/client/cli/test_create.py b9313be657ebaf9c79a7695b75abe2d90a7d75dd 
>   src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
>   src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
>   src/test/python/apache/aurora/client/cli/test_update.py 44a180e88893fea1d7acf1862d5aaa95d98598f5 
>   src/test/python/apache/aurora/client/cli/util.py a2c9d09c58243250baefab20000ee51f5ea3b411 
>   src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
>   src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
>   src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
>   src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
>   src/test/python/apache/aurora/client/commands/util.py e24f130234a431969d6f52233e9b7fa9297bbaa4 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 664c3e3c27a58d64d73ac8c9066bf4dc721415ad 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora dcf61033743317a51dd2f77e8d254c4781cb6a93 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Brian Wickman <wi...@apache.org>.

> On June 25, 2014, 10:44 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/instance_watcher.py, line 48
> > <https://reviews.apache.org/r/21440/diff/7-9/?file=604778#file604778line48>
> >
> >     this should be terminating_event=None
> >     
> >     and self._terminating = terminating_event or Event()
> >     
> >     otherwise you have a shared singleton Event object across all InstaceWatchers which is probably not what you want
> 
> Maxim Khutornenko wrote:
>     I actually always need it as it's now being used to wait on instead of _clock.sleep() (line 128).

i'm not saying to remove the terminating_event.  what I'm saying is that "terminating_event=Event()" in the constructor constructs a global singleton that all instantiations of the instance watcher will use, which is not what you want.  instead you should do terminating_event=None in the constructor, then assign self._terminating_event = terminating_event or Event() (translation: use the one passed in, or if None is passed in, create a new one for the user, instead of using a global singleton.)


- Brian


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


On June 27, 2014, 6:36 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated June 27, 2014, 6:36 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
>   src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
>   src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 10a956c50de893c8380ef1f763ed7d6686b5c00c 
>   src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/sla.py 8fc9af329a726087c0f93fae975298e042c25d8b 
>   src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
>   src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
>   src/main/python/apache/aurora/client/base.py 663a2471ccb53efc80e9918a26c324475ee50938 
>   src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
>   src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
>   src/test/python/apache/aurora/client/cli/test_create.py b9313be657ebaf9c79a7695b75abe2d90a7d75dd 
>   src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
>   src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
>   src/test/python/apache/aurora/client/cli/test_update.py 44a180e88893fea1d7acf1862d5aaa95d98598f5 
>   src/test/python/apache/aurora/client/cli/util.py a2c9d09c58243250baefab20000ee51f5ea3b411 
>   src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
>   src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
>   src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
>   src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
>   src/test/python/apache/aurora/client/commands/util.py e24f130234a431969d6f52233e9b7fa9297bbaa4 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 664c3e3c27a58d64d73ac8c9066bf4dc721415ad 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora dcf61033743317a51dd2f77e8d254c4781cb6a93 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Brian Wickman <wi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/#review46692
-----------------------------------------------------------



src/main/python/apache/aurora/client/api/instance_watcher.py
<https://reviews.apache.org/r/21440/#comment82231>

    this should be terminating_event=None
    
    and self._terminating = terminating_event or Event()
    
    otherwise you have a shared singleton Event object across all InstaceWatchers which is probably not what you want



src/main/python/apache/aurora/client/api/job_monitor.py
<https://reviews.apache.org/r/21440/#comment82232>

    same comment re:Event



src/main/python/apache/aurora/client/api/scheduler_mux.py
<https://reviews.apache.org/r/21440/#comment82233>

    it's more idiomatic/consistent with the rest of the codebase to make Error be inside the class, i.e.
    
    class SchedulerMux(object):
      class Error(Exception): pass
    
    then raising self.Error



src/main/python/apache/aurora/client/api/task_util.py
<https://reviews.apache.org/r/21440/#comment82237>

    inline the returns, e.g.
    
    if self._scheduler_mux:
       return ...
    else:
       return ...



src/main/python/apache/aurora/client/api/task_util.py
<https://reviews.apache.org/r/21440/#comment82234>

    not optional unless you do something like instance_ids=None in the defn
    
    then furthermore you can be a little more specific in the include_ids method
    
    include_ids = lambda id: id in instance_ids if instance_ids is not None else True



src/main/python/apache/aurora/client/api/task_util.py
<https://reviews.apache.org/r/21440/#comment82238>

    this is copypasta from apache/aurora/client/base.py -- maybe add a format_response method there so that you can just do log.debug(format_response(resp))
    
    



src/test/python/apache/aurora/client/api/test_scheduler_mux.py
<https://reviews.apache.org/r/21440/#comment82235>

    Amount(1, Time.MILLISECONDS) to make this faster



src/test/python/apache/aurora/client/api/test_task_util.py
<https://reviews.apache.org/r/21440/#comment82236>

    why the def create_task?  the following is <100:
    
    return [ScheduledTask(assignedTask=AssignedTask(instanceId=index)) for index in cls.INSTANCES]


- Brian Wickman


On June 24, 2014, 11:28 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated June 24, 2014, 11:28 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
>   src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
>   src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 10a956c50de893c8380ef1f763ed7d6686b5c00c 
>   src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
>   src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
>   src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
>   src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
>   src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
>   src/test/python/apache/aurora/client/cli/test_create.py b9313be657ebaf9c79a7695b75abe2d90a7d75dd 
>   src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
>   src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
>   src/test/python/apache/aurora/client/cli/test_update.py 44a180e88893fea1d7acf1862d5aaa95d98598f5 
>   src/test/python/apache/aurora/client/cli/util.py a2c9d09c58243250baefab20000ee51f5ea3b411 
>   src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
>   src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
>   src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
>   src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
>   src/test/python/apache/aurora/client/commands/util.py b1822f27d2890469efefc5bfa0878f29163c167a 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated June 24, 2014, 11:28 p.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

Rebased and fixed merge problem.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
  src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
  src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
  src/main/python/apache/aurora/client/api/scheduler_client.py 10a956c50de893c8380ef1f763ed7d6686b5c00c 
  src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
  src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
  src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
  src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
  src/test/python/apache/aurora/client/cli/test_create.py b9313be657ebaf9c79a7695b75abe2d90a7d75dd 
  src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
  src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
  src/test/python/apache/aurora/client/cli/test_update.py 44a180e88893fea1d7acf1862d5aaa95d98598f5 
  src/test/python/apache/aurora/client/cli/util.py a2c9d09c58243250baefab20000ee51f5ea3b411 
  src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
  src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
  src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
  src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
  src/test/python/apache/aurora/client/commands/util.py b1822f27d2890469efefc5bfa0878f29163c167a 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
  src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated June 24, 2014, 11:24 p.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

Adding multiplexing for the getTasksStatus calls.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/BUILD c205a7d5f281c2b9e52d778c3d84647f25dafc15 
  src/main/python/apache/aurora/client/api/error_handling_thread.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
  src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
  src/main/python/apache/aurora/client/api/scheduler_client.py 10a956c50de893c8380ef1f763ed7d6686b5c00c 
  src/main/python/apache/aurora/client/api/scheduler_mux.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/task_util.py PRE-CREATION 
  src/main/python/apache/aurora/client/api/updater.py c592651770f9426fd42b7f92fe2185e1e3065c43 
  src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
  src/test/python/apache/aurora/client/api/BUILD 804195b719cad7652b3ccb15f03c7c80fc2a13f3 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
  src/test/python/apache/aurora/client/api/test_scheduler_mux.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_task_util.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_updater.py 48f82c8d9606b7e3bae77eaabbbca8edc92ab045 
  src/test/python/apache/aurora/client/cli/test_create.py b9313be657ebaf9c79a7695b75abe2d90a7d75dd 
  src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
  src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
  src/test/python/apache/aurora/client/cli/test_update.py 44a180e88893fea1d7acf1862d5aaa95d98598f5 
  src/test/python/apache/aurora/client/cli/util.py a2c9d09c58243250baefab20000ee51f5ea3b411 
  src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
  src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
  src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
  src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
  src/test/python/apache/aurora/client/commands/util.py b1822f27d2890469efefc5bfa0878f29163c167a 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
  src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated June 6, 2014, 5:55 p.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

CR comments and rebasing.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
  src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
  src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
  src/main/python/apache/aurora/client/api/updater.py de7912ce10f04d9e4c73faac4198741f47189258 
  src/main/python/apache/aurora/client/api/updater_util.py 6b689c11b86c99ef5538c0b7bf4dbb81e0df2d13 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 723a5b6f429f85202ee4ad3a004f019cec632a98 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 3aa96075e085ac7c2607a8c303ee5daf6e3e43b0 
  src/test/python/apache/aurora/client/api/test_updater.py 0ee342c848e15666d34fd38d3cd22574b9346ee3 
  src/test/python/apache/aurora/client/cli/test_create.py 224adc31c8a4a32c55384359d319d0fa6bef4f19 
  src/test/python/apache/aurora/client/cli/test_kill.py e9e167991cd06e556dbbc839eb9a808eb7d88fe9 
  src/test/python/apache/aurora/client/cli/test_restart.py 407eb41eb6e78721ef29baefdee5699e605193f9 
  src/test/python/apache/aurora/client/cli/test_update.py 08be49e81f190822dca80f3728845138d341574b 
  src/test/python/apache/aurora/client/cli/util.py 070718caaf912374f00fa89fdb9266ab95b3c483 
  src/test/python/apache/aurora/client/commands/test_create.py 4cd1343b19e9d13abe20d3b88dc7460ec512d57b 
  src/test/python/apache/aurora/client/commands/test_kill.py 94bbe1bfff1c8d333837aa6bb14700714f46288b 
  src/test/python/apache/aurora/client/commands/test_restart.py 0c6d5a069c43d96098c126aa340a734cb37c667a 
  src/test/python/apache/aurora/client/commands/test_update.py ea8e092267fd65ccd24ca1be3c04f50ba89f5236 
  src/test/python/apache/aurora/client/commands/util.py 84784171816797f3a4fa4c5238d19b626e68ff44 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
  src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated May 30, 2014, 10:08 p.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

Rebased. Brian, ping.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/instance_watcher.py e09aa9a6c32c17f13c9b8ff3a589919587bd839b 
  src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
  src/main/python/apache/aurora/client/api/scheduler_client.py 7be974eb91089f776656ce65b64ee6d8c5b46394 
  src/main/python/apache/aurora/client/api/updater.py ea7285a75020a47142e1761c7ed455cdc838e37c 
  src/main/python/apache/aurora/client/api/updater_util.py 04105de8fb2ce1cab049eb06fd313a43bdcd28db 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py b2d0c804ae2b2095d8d2a99ea42f4da06041cec8 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 665db74475f4828af2050e98e20bbb3b1b29cf0c 
  src/test/python/apache/aurora/client/api/test_updater.py ba783da7c0d93bb0bfd03809f62ddcad3f98cd0a 
  src/test/python/apache/aurora/client/cli/test_create.py b186b52416a2fae8de28fd1d21e7eec07fea8e55 
  src/test/python/apache/aurora/client/cli/test_kill.py 666ec3aa0745191aa1395e47728343cd0eda7115 
  src/test/python/apache/aurora/client/cli/test_restart.py 50acc09491ac21935af78499ad66726df5a8f2ff 
  src/test/python/apache/aurora/client/cli/test_update.py a2abc5eb0f11f9bc563f4504c93fcf5b7520d141 
  src/test/python/apache/aurora/client/cli/util.py dac4928111200136a9987c9622087e8cdca7f2d2 
  src/test/python/apache/aurora/client/commands/test_create.py 75f068250b31b656c9c87a6aa66872fbb777b0c0 
  src/test/python/apache/aurora/client/commands/test_kill.py 3e2ac1fcea301f0ae986b61d9851d10e86996a20 
  src/test/python/apache/aurora/client/commands/test_restart.py 6e0159f134388a251cb44cd700102d05467a9062 
  src/test/python/apache/aurora/client/commands/test_update.py c5afbd33d1b2f82e9603c93b967fbc942c0952d7 
  src/test/python/apache/aurora/client/commands/util.py 84784171816797f3a4fa4c5238d19b626e68ff44 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
  src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated May 28, 2014, 12:20 a.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

CR comments.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/instance_watcher.py 15a7f74f10f1edf51cc6244b54e6ebd4a667cb88 
  src/main/python/apache/aurora/client/api/job_monitor.py d176995fca68d42fcc2d3989483eaf520d0d737f 
  src/main/python/apache/aurora/client/api/scheduler_client.py 7be974eb91089f776656ce65b64ee6d8c5b46394 
  src/main/python/apache/aurora/client/api/updater.py f028498840ee4ed40790360ea6b6024ae623d60a 
  src/main/python/apache/aurora/client/api/updater_util.py 04105de8fb2ce1cab049eb06fd313a43bdcd28db 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 89f1d90a93f1a339b7d8d27a86421726391d02f4 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 7fe1a00b229f17300731e5b7eb6fb976f9710661 
  src/test/python/apache/aurora/client/api/test_updater.py 6be419eccc7e20c7728d6e52955db3fd289f6a29 
  src/test/python/apache/aurora/client/cli/test_create.py b186b52416a2fae8de28fd1d21e7eec07fea8e55 
  src/test/python/apache/aurora/client/cli/test_kill.py 666ec3aa0745191aa1395e47728343cd0eda7115 
  src/test/python/apache/aurora/client/cli/test_restart.py 50acc09491ac21935af78499ad66726df5a8f2ff 
  src/test/python/apache/aurora/client/cli/test_update.py a2abc5eb0f11f9bc563f4504c93fcf5b7520d141 
  src/test/python/apache/aurora/client/cli/util.py 6533fae95b01c4ab3daf791fddf5417167bbbecb 
  src/test/python/apache/aurora/client/commands/test_create.py 75f068250b31b656c9c87a6aa66872fbb777b0c0 
  src/test/python/apache/aurora/client/commands/test_kill.py 00c4ceffd0ff562088a2215cc97d67a434e2394d 
  src/test/python/apache/aurora/client/commands/test_restart.py 6e0159f134388a251cb44cd700102d05467a9062 
  src/test/python/apache/aurora/client/commands/test_update.py c5afbd33d1b2f82e9603c93b967fbc942c0952d7 
  src/test/python/apache/aurora/client/commands/util.py f5346841f760f30143317ac49f1d0e54144b0419 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 2a4773c81efb390385f675854e9631500b263a45 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
  src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 9c5652829ac306dda5f7e95e164c85713e18988f 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 2af256d65850bd861111279dff4b5c53f234cf7a 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated May 23, 2014, 1:19 a.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

Rebased.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
  src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
  src/main/python/apache/aurora/client/api/scheduler_client.py df9d7e0a170271298137e4279221f271d355e9c5 
  src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
  src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 09dda3bed6a5097f6dff8153249a7460a5b24d58 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 3df042019d845421e5c8d79232ed865e342d44fc 
  src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
  src/test/python/apache/aurora/client/cli/test_create.py ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
  src/test/python/apache/aurora/client/cli/test_kill.py 3c8e72de5e04b3c7dc769579506dca750b1f3089 
  src/test/python/apache/aurora/client/cli/test_restart.py 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
  src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
  src/test/python/apache/aurora/client/cli/util.py ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
  src/test/python/apache/aurora/client/commands/test_create.py 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
  src/test/python/apache/aurora/client/commands/test_kill.py bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
  src/test/python/apache/aurora/client/commands/test_restart.py 18e90aa8731798daac5fb5700807ebe2eb794cf9 
  src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
  src/test/python/apache/aurora/client/commands/util.py 4e587f320c785b56f5812364d50946cb2b6f03dc 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 80871273fc4d47558253e6b09c92724e8693bc11 
  src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora fc723cf232ddbc10458fc394e37358c8523118c2 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 2b546f116446694eb7b0d772ae864d6d83012573 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 9b4a00bf54123fdbcf3f215e38e9807d17719d35 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated May 21, 2014, 4:58 p.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

CR comments.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
  src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
  src/main/python/apache/aurora/client/api/scheduler_client.py ff5d2bc52af75ff2d2eee2d9b72c8d9a0df12581 
  src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
  src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 09dda3bed6a5097f6dff8153249a7460a5b24d58 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 3df042019d845421e5c8d79232ed865e342d44fc 
  src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
  src/test/python/apache/aurora/client/cli/test_create.py ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
  src/test/python/apache/aurora/client/cli/test_kill.py 3c8e72de5e04b3c7dc769579506dca750b1f3089 
  src/test/python/apache/aurora/client/cli/test_restart.py 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
  src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
  src/test/python/apache/aurora/client/cli/util.py ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
  src/test/python/apache/aurora/client/commands/test_create.py 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
  src/test/python/apache/aurora/client/commands/test_kill.py bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
  src/test/python/apache/aurora/client/commands/test_restart.py 18e90aa8731798daac5fb5700807ebe2eb794cf9 
  src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
  src/test/python/apache/aurora/client/commands/util.py 4e587f320c785b56f5812364d50946cb2b6f03dc 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
  src/test/sh/org/apache/aurora/e2e/flask/flask_example.aurora ad5aafec1f796baef766ed12b2a597f26997d5b3 
  src/test/sh/org/apache/aurora/e2e/flask/flask_example_updated.aurora 6d54463c349699946c2063385b1bd38a0f8c9e58 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh c8fa07a5426c6c7748412062c26996b84637efb3 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 3c4165c8464b42f7f5dc4f94a079ff7c3086cdbc 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/
-----------------------------------------------------------

(Updated May 15, 2014, 10:52 p.m.)


Review request for Aurora, Mark Chu-Carroll and Brian Wickman.


Changes
-------

CR comments.


Bugs: AURORA-350
    https://issues.apache.org/jira/browse/AURORA-350


Repository: aurora


Description
-------

The updater now spawns upto batch_size threads to process one instance per thread. 

All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
  src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
  src/main/python/apache/aurora/client/api/scheduler_client.py ff5d2bc52af75ff2d2eee2d9b72c8d9a0df12581 
  src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
  src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
  src/test/python/apache/aurora/client/api/test_instance_watcher.py 09dda3bed6a5097f6dff8153249a7460a5b24d58 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 3df042019d845421e5c8d79232ed865e342d44fc 
  src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
  src/test/python/apache/aurora/client/cli/test_create.py ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
  src/test/python/apache/aurora/client/cli/test_kill.py 3c8e72de5e04b3c7dc769579506dca750b1f3089 
  src/test/python/apache/aurora/client/cli/test_restart.py 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
  src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
  src/test/python/apache/aurora/client/cli/util.py ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
  src/test/python/apache/aurora/client/commands/test_create.py 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
  src/test/python/apache/aurora/client/commands/test_kill.py bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
  src/test/python/apache/aurora/client/commands/test_restart.py 18e90aa8731798daac5fb5700807ebe2eb794cf9 
  src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
  src/test/python/apache/aurora/client/commands/util.py 4e587f320c785b56f5812364d50946cb2b6f03dc 
  src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
  src/test/sh/org/apache/aurora/e2e/flask/flask_example.aurora ad5aafec1f796baef766ed12b2a597f26997d5b3 
  src/test/sh/org/apache/aurora/e2e/flask/flask_example_updated.aurora 6d54463c349699946c2063385b1bd38a0f8c9e58 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh c8fa07a5426c6c7748412062c26996b84637efb3 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 3c4165c8464b42f7f5dc4f94a079ff7c3086cdbc 

Diff: https://reviews.apache.org/r/21440/diff/


Testing
-------

./pants src/test/python:all
src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh


Thanks,

Maxim Khutornenko


Re: Review Request 21440: Implementing parallel updater

Posted by Maxim Khutornenko <ma...@apache.org>.

> On May 14, 2014, 10:57 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 237
> > <https://reviews.apache.org/r/21440/diff/1/?file=581729#file581729line237>
> >
> >     it surprises me that this is necessary.  will signal.signal() even work outside of the MainThread?  i'm pretty sure OSes will raise an exception if you try (e.g. Linux)

You can't signal from a non-main thread but apparently any thread can catch KeyboardInterrupt. This wasted a few hours of my life until I ran into this "little" caveat (https://docs.python.org/2/library/thread.html?highlight=keyboardinterrupt):

"Threads interact strangely with interrupts: the KeyboardInterrupt exception will be received by an arbitrary thread. (When the signal module is available, interrupts always go to the main thread.)"


> On May 14, 2014, 10:57 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 224
> > <https://reviews.apache.org/r/21440/diff/1/?file=581729#file581729line224>
> >
> >     snake_case please

Done.


> On May 14, 2014, 10:57 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 64
> > <https://reviews.apache.org/r/21440/diff/1/?file=581729#file581729line64>
> >
> >     since you're creating unbounded queues, this is equivalent to .put() (here and elsewhere)

Changed.


> On May 14, 2014, 10:57 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/updater.py, line 23
> > <https://reviews.apache.org/r/21440/diff/1/?file=581729#file581729line23>
> >
> >     minor nit, this should be
> >     
> >     try:
> >       from Queue import Queue, Empty
> >     except ImportError:
> >       from queue import Queue, Empty
> >     
> >     (yay 2.x/3.x)

Done.


> On May 14, 2014, 10:57 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/instance_watcher.py, line 97
> > <https://reviews.apache.org/r/21440/diff/1/?file=581726#file581726line97>
> >
> >     while not self._terminating:

Done.


> On May 14, 2014, 10:57 p.m., Brian Wickman wrote:
> > src/main/python/apache/aurora/client/api/job_monitor.py, lines 93-94
> > <https://reviews.apache.org/r/21440/diff/1/?file=581727#file581727line93>
> >
> >     the reason that I like self._terminating to be a threading.Event is because then you could do:
> >     
> >     self._terminating.wait(poll_interval.as_(Time.SECONDS))
> >     
> >     which means that you will break out of the loop fast if self.terminate() is called from another thread.

Thanks, I see now what you meant. Great suggestion. Done.


- Maxim


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


On May 14, 2014, 6:49 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 14, 2014, 6:49 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py ff5d2bc52af75ff2d2eee2d9b72c8d9a0df12581 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py 9d51a2e1fe961d4b522ac5b70f0737130326abe9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py fc9e2f17537e1e731381b825ac4b5646e5130654 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example.aurora ad5aafec1f796baef766ed12b2a597f26997d5b3 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example_updated.aurora 6d54463c349699946c2063385b1bd38a0f8c9e58 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh c8fa07a5426c6c7748412062c26996b84637efb3 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 3c4165c8464b42f7f5dc4f94a079ff7c3086cdbc 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 21440: Implementing parallel updater

Posted by Brian Wickman <wi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21440/#review43046
-----------------------------------------------------------


a few high level comments.  still need to wade through the semantics since it's a big change.


src/main/python/apache/aurora/client/api/instance_watcher.py
<https://reviews.apache.org/r/21440/#comment77043>

    while not self._terminating:



src/main/python/apache/aurora/client/api/job_monitor.py
<https://reviews.apache.org/r/21440/#comment77044>

    the reason that I like self._terminating to be a threading.Event is because then you could do:
    
    self._terminating.wait(poll_interval.as_(Time.SECONDS))
    
    which means that you will break out of the loop fast if self.terminate() is called from another thread.



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77054>

    minor nit, this should be
    
    try:
      from Queue import Queue, Empty
    except ImportError:
      from queue import Queue, Empty
    
    (yay 2.x/3.x)



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77046>

    since you're creating unbounded queues, this is equivalent to .put() (here and elsewhere)



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77048>

    snake_case please



src/main/python/apache/aurora/client/api/updater.py
<https://reviews.apache.org/r/21440/#comment77050>

    it surprises me that this is necessary.  will signal.signal() even work outside of the MainThread?  i'm pretty sure OSes will raise an exception if you try (e.g. Linux)


- Brian Wickman


On May 14, 2014, 6:49 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 14, 2014, 6:49 p.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch kill/add/restart calls. This is the first step towards a fully multiplexed SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py ff5d2bc52af75ff2d2eee2d9b72c8d9a0df12581 
>   src/main/python/apache/aurora/client/api/updater.py e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_updater.py 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_update.py a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py 9d51a2e1fe961d4b522ac5b70f0737130326abe9 
>   src/test/python/apache/aurora/client/commands/test_update.py 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py fc9e2f17537e1e731381b825ac4b5646e5130654 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example.aurora ad5aafec1f796baef766ed12b2a597f26997d5b3 
>   src/test/sh/org/apache/aurora/e2e/flask/flask_example_updated.aurora 6d54463c349699946c2063385b1bd38a0f8c9e58 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh c8fa07a5426c6c7748412062c26996b84637efb3 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 3c4165c8464b42f7f5dc4f94a079ff7c3086cdbc 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>