aurora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Farner" <wfar...@apache.org>
Subject Re: Review Request 16231: Added getJobSummary call to thrift API
Date Sat, 14 Dec 2013 02:13:47 GMT

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



src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterface.java
<https://reviews.apache.org/r/16231/#comment58191>

    Please remove — ordering should be a display concern.



src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterface.java
<https://reviews.apache.org/r/16231/#comment58192>

    I'd love to do without the mutable state, even if it's short-lived.  Can you instead index
into two SetMultimaps, and iterate over the union of their key sets?
    
    e.g.
    
      Multimap<String, JobKey> jobsByRole = ...;
      Multimap<String, JobKey> cronJobsByRole = ...;
      List<JobSummary> jobSummaries = ...;
      for (String role : Sets.union(jobsByRole.keySet(), cronJobsByRole.keySet()) {
        JobSummary summary = ...;
        summary.setJobCount(jobsByRole.get(role).size());
        summary.setCronJobCount(cronJobsByRole.get(role).size());
        jobSummaries.add(summary);
      }


- Bill Farner


On Dec. 13, 2013, 12:46 a.m., Suman Karumuri wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16231/
> -----------------------------------------------------------
> 
> (Updated Dec. 13, 2013, 12:46 a.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Added a new Thrift service to host all read only api's. Added a getJobSummary call to
the read only service end point. The output of the call will be used to render the home page.
> 
> Implemented the getJobSummary API in SchedulerThriftInterface and added a corresponding
unit test. To keep it simple, the implementation of getJobSummary is a clone of SchedulerzHome.get().
> 
> 
> Diffs
> -----
> 
>   src/main/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterface.java 503ac447c364340dc7072d15fd3c94532779f7c1

>   src/main/thrift/com/twitter/aurora/gen/api.thrift 9b3680b7f219e2805bdc37f2e7560cdca41a5913

>   src/test/java/com/twitter/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
1e1e7b5a9c2805790ed26939e151b727a15ec88d 
>   src/test/java/com/twitter/aurora/scheduler/thrift/aop/ForwardingThrift.java 7c5100bd043273ca85e3ed9b54f9cd4f4725d83c

> 
> Diff: https://reviews.apache.org/r/16231/diff/
> 
> 
> Testing
> -------
> 
> gradle clean build
> 
> 
> Thanks,
> 
> Suman Karumuri
> 
>


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