> On Nov. 19, 2016, 11: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. > > Renan DelValle wrote: > 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 :).
Thanks for the update. That it what I was trying to propose :-) - Stephan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53923/#review156396 ----------------------------------------------------------- On Nov. 23, 2016, 2:25 a.m., Renan DelValle wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53923/ > ----------------------------------------------------------- > > (Updated Nov. 23, 2016, 2:25 a.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 > >
