> On Oct. 17, 2016, 11:45 a.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/metadata/NearestFit.java, line 144
> > <https://reviews.apache.org/r/51993/diff/4/?file=1538875#file1538875line144>
> >
> >     This split looks kind of magic. What does it do?
> 
> Pradyumna Kaushik wrote:
>     Joiner.on(...) would return a comma separated string of reasons. I need 
> to convert that to a List<String>. I am splitting the comma separated string 
> (returned by Joiner.on(...)) with <any number of spaces before> comma <any 
> number of spaces after> so that I end up with a String[] of reasons. I pass 
> this String[] of reasons to Arrays.asList(...) to generate a List<String>.
>     
>     I will comment that line of code so that it is understandable as to what 
> I am doing.
> 
> Pradyumna Kaushik wrote:
>     I can just make NearestFit#getPendingReasons() return Map<TaskGroupKey, 
> String[]> instead of Map<TaskGroupKey, List<String>>. This way, I won't need 
> to convert String[] into List<String> using Arrays.asList(...). Please let me 
> know which would be better.

Just posted the changes mentioned above for review.


- Pradyumna


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


On Oct. 17, 2016, 11:35 p.m., Pradyumna Kaushik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51993/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2016, 11:35 p.m.)
> 
> 
> Review request for Aurora and Joshua Cohen.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Added the 'reason' to the /pendingTasks endpoint
> 
> 
> Diffs
> -----
> 
>   config/legacy_untested_classes.txt ee4d3d7e537356ae99ba3a90a3631749067662f3 
>   src/main/java/org/apache/aurora/scheduler/http/PendingTasks.java 
> c80e0c8adf80e12082a6952ae79b7d9cc960c5b6 
>   src/main/java/org/apache/aurora/scheduler/metadata/NearestFit.java 
> f783e7ff220573915524a1efc27141193d19fa6c 
>   src/main/java/org/apache/aurora/scheduler/scheduling/TaskGroup.java 
> 5d319557057e27fd5fc6d3e553e9ca9139399c50 
>   src/main/java/org/apache/aurora/scheduler/scheduling/TaskGroups.java 
> d390c07522d22e43d79ce4370985f3643ef021ca 
>   src/test/java/org/apache/aurora/scheduler/http/OffersTest.java 
> 9e3573252cf37153180b1fc5ab9150bab0299c99 
>   src/test/java/org/apache/aurora/scheduler/http/PendingTasksTest.java 
> PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/metadata/NearestFitTest.java 
> d9b3cc672f42c50b2a2a142733d26c0725bbc864 
> 
> Diff: https://reviews.apache.org/r/51993/diff/
> 
> 
> Testing
> -------
> 
> ./build-support/jenkins/build.sh
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Pradyumna Kaushik
> 
>

Reply via email to