aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renan DelValle <rdelv...@binghamton.edu>
Subject Re: Review Request 53923: Filter out calls to fromResource for resources that Aurora does not support yet to avoid crashing
Date Wed, 23 Nov 2016 01:24:27 GMT


> On Nov. 19, 2016, 2:12 a.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/resources/ResourceManager.java, line 204
> > <https://reviews.apache.org/r/53923/diff/1/?file=1567382#file1567382line204>
> >
> >     Use `SUPPORTED_RESOURCE` here as well.
> 
> Renan DelValle wrote:
>     This one was a bit tricky. Because it uses streams instead of iterables, it requires
a java.util.predicate instead of the Guava predicate. So I couldn't use SUPPORTED_RESOURCE
here unfortunately. Instead, I put in the actual predicate in a filter in 203 to address this
problem. Let me know if that makes sense or if we can do something to convert SUPPORTED_RESOURCE
to the java util predicate. Otherwise I can leave a comment indicating why it doesn't use
SUPPORTED_RESOURCE directly.
> 
> Stephan Erb wrote:
>     An easy way would be to call the Guava predicate from a java.util.predicate. This
is not nice, but at least makes it easy to spot all places relying on the filtering logic
if we ever decide to drop it.

Agreed. I think I just found a solution that isn't too bad. I'll post it soon. My hope is
that someone takes up AURORA-1328 quick and we can forget these filters ever existed :).


- Renan


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


On Nov. 18, 2016, 7:21 p.m., Renan DelValle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53923/
> -----------------------------------------------------------
> 
> (Updated Nov. 18, 2016, 7:21 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Zameer Manji.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Added filters whenever fromResource is called for a Protos.Resource in order to avoid
Aurora crashing. Previously only bagFromMesosResources was using the SUPPORTED_RESOURCE filter.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/resources/ResourceManager.java 589288dc877d74eea1de65715fc498523be43d7f

> 
> Diff: https://reviews.apache.org/r/53923/diff/
> 
> 
> Testing
> -------
> 
> ./build-support/jenkins/build.sh
> 
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> Tested by having a vagrant cluster run with an unsupported resource for an hour this
time in order to make sure it works. End to end testing has been re-done.
> 
> 
> Thanks,
> 
> Renan DelValle
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message