You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Suman Karumuri <ma...@apache.org> on 2014/04/23 08:55:15 UTC

Re: Review Request 20573: Include inactive tasks when computing job summaries

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

(Updated April 23, 2014, 6:55 a.m.)


Review request for Aurora and Bill Farner.


Changes
-------

addressed code review comments.


Summary (updated)
-----------------

Include inactive tasks when computing job summaries


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


Repository: aurora


Description
-------

Currently, the getTasks query was only fetching tasks in active status. Updated the code to fetching all tasks for getJobSummary.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 84151a5308c12b3bee7cf5fd662776e574e8fadf 
  src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java f530c530548444c57d9aeb5ed100a5fda5bd2953 

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


Testing
-------

Tested on laptop.


Thanks,

Suman Karumuri


Re: Review Request 20573: Include inactive tasks when computing job summaries

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

(Updated April 24, 2014, 1:15 a.m.)


Review request for Aurora and Bill Farner.


Changes
-------

Rebased with master.


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


Repository: aurora


Description
-------

Currently, the getTasks query was only fetching tasks in active status. Updated the code to fetching all tasks for getJobSummary.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 4e2dbeb3abfb53f7647e88a1fec95b3ec4590bd7 
  src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java f761feb90c590d4f72323b6bedb15c8d9f715493 

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


Testing
-------

Tested on laptop.


Thanks,

Suman Karumuri


Re: Review Request 20573: Include inactive tasks when computing job summaries

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

(Updated April 23, 2014, 11:08 p.m.)


Review request for Aurora and Bill Farner.


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


Repository: aurora


Description
-------

Currently, the getTasks query was only fetching tasks in active status. Updated the code to fetching all tasks for getJobSummary.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 84151a5308c12b3bee7cf5fd662776e574e8fadf 
  src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java f530c530548444c57d9aeb5ed100a5fda5bd2953 

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


Testing
-------

Tested on laptop.


Thanks,

Suman Karumuri


Re: Review Request 20573: Include inactive tasks when computing job summaries

Posted by Suman Karumuri <ma...@apache.org>.

> On April 23, 2014, 6:15 p.m., Bill Farner wrote:
> > src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java, line 407
> > <https://reviews.apache.org/r/20573/diff/2/?file=565348#file565348line407>
> >
> >     Your call, but you could extract a convenience function (this is basically part of the body from the previous behavior):
> >     
> >       private static Query.Builder maybeRoleScoped(Optional<String> role) {
> >         return role.isPresent() ? Query.roleScoped(role.get()) : Query.unscoped();
> >       }
> >     
> >     Then the work here becomes:
> >     
> >       getTasks(maybeRoleScoped(ownerRole))
> >     
> >     and in the method below:
> >     
> >       getTasks(maybeRoleScoped(ownerRole).active())

Changed.


> On April 23, 2014, 6:15 p.m., Bill Farner wrote:
> > src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java, line 476
> > <https://reviews.apache.org/r/20573/diff/2/?file=565348#file565348line476>
> >
> >     s/Builder/Query.Builder/, matching uses elsewhere in this file.

Changed.


- Suman


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


On April 23, 2014, 11:08 p.m., Suman Karumuri wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20573/
> -----------------------------------------------------------
> 
> (Updated April 23, 2014, 11:08 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-338
>     https://issues.apache.org/jira/browse/AURORA-338
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Currently, the getTasks query was only fetching tasks in active status. Updated the code to fetching all tasks for getJobSummary.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 84151a5308c12b3bee7cf5fd662776e574e8fadf 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java f530c530548444c57d9aeb5ed100a5fda5bd2953 
> 
> Diff: https://reviews.apache.org/r/20573/diff/
> 
> 
> Testing
> -------
> 
> Tested on laptop.
> 
> 
> Thanks,
> 
> Suman Karumuri
> 
>


Re: Review Request 20573: Include inactive tasks when computing job summaries

Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20573/#review41172
-----------------------------------------------------------

Ship it!



src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
<https://reviews.apache.org/r/20573/#comment74579>

    Your call, but you could extract a convenience function (this is basically part of the body from the previous behavior):
    
      private static Query.Builder maybeRoleScoped(Optional<String> role) {
        return role.isPresent() ? Query.roleScoped(role.get()) : Query.unscoped();
      }
    
    Then the work here becomes:
    
      getTasks(maybeRoleScoped(ownerRole))
    
    and in the method below:
    
      getTasks(maybeRoleScoped(ownerRole).active())



src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
<https://reviews.apache.org/r/20573/#comment74577>

    s/Builder/Query.Builder/, matching uses elsewhere in this file.


- Bill Farner


On April 23, 2014, 6:55 a.m., Suman Karumuri wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20573/
> -----------------------------------------------------------
> 
> (Updated April 23, 2014, 6:55 a.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Bugs: AURORA-338
>     https://issues.apache.org/jira/browse/AURORA-338
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Currently, the getTasks query was only fetching tasks in active status. Updated the code to fetching all tasks for getJobSummary.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 84151a5308c12b3bee7cf5fd662776e574e8fadf 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java f530c530548444c57d9aeb5ed100a5fda5bd2953 
> 
> Diff: https://reviews.apache.org/r/20573/diff/
> 
> 
> Testing
> -------
> 
> Tested on laptop.
> 
> 
> Thanks,
> 
> Suman Karumuri
> 
>