You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Mehrdad Nurolahzade <me...@nurolahzade.com> on 2016/12/29 18:45:34 UTC

Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

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

Review request for Aurora, David McLaughlin and Stephan Erb.


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


Repository: aurora


Description
-------

AURORA-1826	Expose Thrift server request workload stats


Diffs
-----

  src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java bba1161a48738e19f10fcf72395f8d70b481ed13 
  src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
  src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java 6d0e9bc6a8040393875d4f0a88e8db9d6926a88b 
  src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 

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


Testing
-------

```
curl 192.168.33.7:8081/vars | grep thrift_workload
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
thrift_workload_addInstances 0
thrift_workload_createJob 0
thrift_workload_createOrUpdateCronTemplate 0
thrift_workload_drainHosts 0
thrift_workload_endMaintenance 0
thrift_workload_getConfigSummary 0
thrift_workload_getJobSummary 0
thrift_workload_getJobUpdateDetails 0
thrift_workload_getJobUpdateSummaries 0
thrift_workload_getJobs 0
thrift_workload_getPendingReason 0
thrift_workload_getRoleSummary 0
thrift_workload_getTaskStatus 0
thrift_workload_getTasksWithoutConfigs 0
thrift_workload_killTasks 0
thrift_workload_maintenanceStatus 0
thrift_workload_restartShards 0
thrift_workload_rewriteConfigs 0
thrift_workload_startJobUpdate 0
thrift_workload_startMaintenance 0
```

```
./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh

...

*** OK (All tests passed) ***

mesos-master start/running, process 2359
+ RETCODE=0
+ restore_netrc
+ mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
+ true
Connection to 127.0.0.1 closed.

real	28m58.389s
user	0m1.508s
sys	0m0.820s
```


Thanks,

Mehrdad Nurolahzade


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Mehrdad Nurolahzade <me...@nurolahzade.com>.

> On Dec. 29, 2016, 1:07 p.m., Stephan Erb wrote:
> > Have you considered extending `ThriftStatsExporterInterceptor` (https://github.com/apache/aurora/blob/master/src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java)?
> > 
> > At least all the read only getters could be implemented in a generic fashion by always aggregating the size of of the various fields in the thrift Result union.

I actually did but then gave up after seeing that the non-readonly path does not conform to the pattern on the readonly side. However, thinking about it again maybe it makes sense to automate it for the readonly execution path. Let me try that and see what it's going to be like.


- Mehrdad


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


On Dec. 29, 2016, 10:45 a.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 29, 2016, 10:45 a.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java bba1161a48738e19f10fcf72395f8d70b481ed13 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java 6d0e9bc6a8040393875d4f0a88e8db9d6926a88b 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Stephan Erb <se...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/#review160283
-----------------------------------------------------------



Have you considered extending `ThriftStatsExporterInterceptor` (https://github.com/apache/aurora/blob/master/src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java)?

At least all the read only getters could be implemented in a generic fashion by always aggregating the size of of the various fields in the thrift Result union.

- Stephan Erb


On Dec. 29, 2016, 7:45 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 29, 2016, 7:45 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java bba1161a48738e19f10fcf72395f8d70b481ed13 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java 6d0e9bc6a8040393875d4f0a88e8db9d6926a88b 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/#review160280
-----------------------------------------------------------


Ship it!




Master (21ad18e) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On Dec. 29, 2016, 6:45 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 29, 2016, 6:45 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java bba1161a48738e19f10fcf72395f8d70b481ed13 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java 6d0e9bc6a8040393875d4f0a88e8db9d6926a88b 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Mehrdad Nurolahzade <me...@nurolahzade.com>.

> On Jan. 25, 2017, 3:11 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java, line 427
> > <https://reviews.apache.org/r/55089/diff/2/?file=1593704#file1593704line427>
> >
> >     This annotation can be very missleading when adding a new API endpoint. If you add it to a method it will only be tracked if one has edited in a completly different part of the code. Would it be possible to write something like the following?
> >     
> >     ```
> >         @ThriftWorkload(result -> result.getJobSummaryResult().getSummariesSize())
> >     ```
> 
> Mehrdad Nurolahzade wrote:
>     I like it! Let me try.

Unfortunately, due to language limitations, the elegant lambda expression approach you suggested is not possible. Annotation attributes have to be compile-time constat expressions. Read more here: http://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html#jls-9.7.1-300

I moved the workload mapping logic from `ThriftStatsExporterInterceptor` to the annotation definition site itself, hoping that this might provide more visibility.


- Mehrdad


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


On Dec. 29, 2016, 9:58 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 29, 2016, 9:58 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/Measured.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Mehrdad Nurolahzade <me...@nurolahzade.com>.

> On Jan. 25, 2017, 3:11 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java, line 427
> > <https://reviews.apache.org/r/55089/diff/2/?file=1593704#file1593704line427>
> >
> >     This annotation can be very missleading when adding a new API endpoint. If you add it to a method it will only be tracked if one has edited in a completly different part of the code. Would it be possible to write something like the following?
> >     
> >     ```
> >         @ThriftWorkload(result -> result.getJobSummaryResult().getSummariesSize())
> >     ```

I like it! Let me try.


- Mehrdad


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


On Dec. 29, 2016, 9:58 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 29, 2016, 9:58 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/Measured.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Stephan Erb <se...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/#review163042
-----------------------------------------------------------




src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java (line 427)
<https://reviews.apache.org/r/55089/#comment234471>

    This annotation can be very missleading when adding a new API endpoint. If you add it to a method it will only be tracked if one has edited in a completly different part of the code. Would it be possible to write something like the following?
    
    ```
        @ThriftWorkload(result -> result.getJobSummaryResult().getSummariesSize())
    ```


- Stephan Erb


On Dec. 30, 2016, 6:58 a.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2016, 6:58 a.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/Measured.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/#review160291
-----------------------------------------------------------


Ship it!




Master (21ad18e) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On Dec. 30, 2016, 5:58 a.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2016, 5:58 a.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/Measured.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/#review163187
-----------------------------------------------------------


Ship it!




Master (a8afa59) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On Jan. 26, 2017, 10:07 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2017, 10:07 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftWorkload.java PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/#review163415
-----------------------------------------------------------


Ship it!




Master (1217fc8) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On Jan. 28, 2017, 9:11 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Jan. 28, 2017, 9:11 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This patch introduces a number of stats that measure the workload generated by Thrift server requests.
> 
> Current Thrift server stats expose the number and timing of requests received by the server. However, they fail to reflect the size of the requests. This is limiting us in having an accurate view of the workload handled by the scheduler. For example, every call to `restartShards()` is recorded as one event despite the fact that a request might only restart one shard while another request might seek to restart 1K shards.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftWorkload.java PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Mehrdad Nurolahzade <me...@nurolahzade.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/
-----------------------------------------------------------

(Updated Jan. 28, 2017, 1:11 p.m.)


Review request for Aurora, David McLaughlin and Stephan Erb.


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


Repository: aurora


Description (updated)
-------

This patch introduces a number of stats that measure the workload generated by Thrift server requests.

Current Thrift server stats expose the number and timing of requests received by the server. However, they fail to reflect the size of the requests. This is limiting us in having an accurate view of the workload handled by the scheduler. For example, every call to `restartShards()` is recorded as one event despite the fact that a request might only restart one shard while another request might seek to restart 1K shards.


Diffs
-----

  src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
  src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
  src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftWorkload.java PRE-CREATION 
  src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
  src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 

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


Testing
-------

```
curl 192.168.33.7:8081/vars | grep thrift_workload
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
thrift_workload_addInstances 0
thrift_workload_createJob 0
thrift_workload_createOrUpdateCronTemplate 0
thrift_workload_drainHosts 0
thrift_workload_endMaintenance 0
thrift_workload_getConfigSummary 0
thrift_workload_getJobSummary 0
thrift_workload_getJobUpdateDetails 0
thrift_workload_getJobUpdateSummaries 0
thrift_workload_getJobs 0
thrift_workload_getPendingReason 0
thrift_workload_getRoleSummary 0
thrift_workload_getTaskStatus 0
thrift_workload_getTasksWithoutConfigs 0
thrift_workload_killTasks 0
thrift_workload_maintenanceStatus 0
thrift_workload_restartShards 0
thrift_workload_rewriteConfigs 0
thrift_workload_startJobUpdate 0
thrift_workload_startMaintenance 0
```

```
./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh

...

*** OK (All tests passed) ***

mesos-master start/running, process 2359
+ RETCODE=0
+ restore_netrc
+ mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
+ true
Connection to 127.0.0.1 closed.

real	28m58.389s
user	0m1.508s
sys	0m0.820s
```


Thanks,

Mehrdad Nurolahzade


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Mehrdad Nurolahzade <me...@nurolahzade.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/
-----------------------------------------------------------

(Updated Jan. 28, 2017, 1:05 p.m.)


Review request for Aurora, David McLaughlin and Stephan Erb.


Changes
-------

Added `scheduler` prefix to stat name.


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


Repository: aurora


Description
-------

AURORA-1826	Expose Thrift server request workload stats


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
  src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
  src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftWorkload.java PRE-CREATION 
  src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
  src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 

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


Testing
-------

```
curl 192.168.33.7:8081/vars | grep thrift_workload
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
thrift_workload_addInstances 0
thrift_workload_createJob 0
thrift_workload_createOrUpdateCronTemplate 0
thrift_workload_drainHosts 0
thrift_workload_endMaintenance 0
thrift_workload_getConfigSummary 0
thrift_workload_getJobSummary 0
thrift_workload_getJobUpdateDetails 0
thrift_workload_getJobUpdateSummaries 0
thrift_workload_getJobs 0
thrift_workload_getPendingReason 0
thrift_workload_getRoleSummary 0
thrift_workload_getTaskStatus 0
thrift_workload_getTasksWithoutConfigs 0
thrift_workload_killTasks 0
thrift_workload_maintenanceStatus 0
thrift_workload_restartShards 0
thrift_workload_rewriteConfigs 0
thrift_workload_startJobUpdate 0
thrift_workload_startMaintenance 0
```

```
./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh

...

*** OK (All tests passed) ***

mesos-master start/running, process 2359
+ RETCODE=0
+ restore_netrc
+ mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
+ true
Connection to 127.0.0.1 closed.

real	28m58.389s
user	0m1.508s
sys	0m0.820s
```


Thanks,

Mehrdad Nurolahzade


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Stephan Erb <se...@apache.org>.

> On Jan. 28, 2017, 12:37 a.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java, lines 65-72
> > <https://reviews.apache.org/r/55089/diff/3/?file=1616764#file1616764line65>
> >
> >     Can `invocation.proceed();` ever return `null`?
> >     
> >     If not, then we could move the new counter code from the `finally` to the `try` block and eliminate the `response != null` guard.
> 
> Mehrdad Nurolahzade wrote:
>     `response != null` guard is a necessary protection from the corner case when `invocation.proceed()` throws an exception.

If we move the whole code block into the try block, shortly behind `invocation.proceed()` then we don't need the `response != null` guard any longer. 

But this is only a minor thing. I will apply the patch now without the change.


- Stephan


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


On Jan. 28, 2017, 10:11 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Jan. 28, 2017, 10:11 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This patch introduces a number of stats that measure the workload generated by Thrift server requests.
> 
> Current Thrift server stats expose the number and timing of requests received by the server. However, they fail to reflect the size of the requests. This is limiting us in having an accurate view of the workload handled by the scheduler. For example, every call to `restartShards()` is recorded as one event despite the fact that a request might only restart one shard while another request might seek to restart 1K shards.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftWorkload.java PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Mehrdad Nurolahzade <me...@nurolahzade.com>.

> On Jan. 27, 2017, 3:37 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java, lines 65-72
> > <https://reviews.apache.org/r/55089/diff/3/?file=1616764#file1616764line65>
> >
> >     Can `invocation.proceed();` ever return `null`?
> >     
> >     If not, then we could move the new counter code from the `finally` to the `try` block and eliminate the `response != null` guard.

`response != null` guard is a necessary protection from the corner case when `invocation.proceed()` throws an exception.


> On Jan. 27, 2017, 3:37 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java, line 51
> > <https://reviews.apache.org/r/55089/diff/3/?file=1616764#file1616764line51>
> >
> >     ... should we use `scheduler_` as a prefix here as well?

Done.


- Mehrdad


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


On Jan. 26, 2017, 2:07 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2017, 2:07 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftWorkload.java PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Stephan Erb <se...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/#review163351
-----------------------------------------------------------


Ship it!




LGTM


src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java (line 41)
<https://reviews.apache.org/r/55089/#comment234757>

    now that I see this...



src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java (line 51)
<https://reviews.apache.org/r/55089/#comment234758>

    ... should we use `scheduler_` as a prefix here as well?



src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java (lines 65 - 72)
<https://reviews.apache.org/r/55089/#comment234759>

    Can `invocation.proceed();` ever return `null`?
    
    If not, then we could move the new counter code from the `finally` to the `try` block and eliminate the `response != null` guard.


L

- Stephan Erb


On Jan. 26, 2017, 11:07 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2017, 11:07 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftWorkload.java PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Mehrdad Nurolahzade <me...@nurolahzade.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/
-----------------------------------------------------------

(Updated Jan. 26, 2017, 2:07 p.m.)


Review request for Aurora, David McLaughlin and Stephan Erb.


Changes
-------

Moved the workload mapping logic from `ThriftStatsExporterInterceptor` to the annotation definition site itself, hoping that this might provide more visibility.


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


Repository: aurora


Description
-------

AURORA-1826	Expose Thrift server request workload stats


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
  src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
  src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftWorkload.java PRE-CREATION 
  src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
  src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 

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


Testing
-------

```
curl 192.168.33.7:8081/vars | grep thrift_workload
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
thrift_workload_addInstances 0
thrift_workload_createJob 0
thrift_workload_createOrUpdateCronTemplate 0
thrift_workload_drainHosts 0
thrift_workload_endMaintenance 0
thrift_workload_getConfigSummary 0
thrift_workload_getJobSummary 0
thrift_workload_getJobUpdateDetails 0
thrift_workload_getJobUpdateSummaries 0
thrift_workload_getJobs 0
thrift_workload_getPendingReason 0
thrift_workload_getRoleSummary 0
thrift_workload_getTaskStatus 0
thrift_workload_getTasksWithoutConfigs 0
thrift_workload_killTasks 0
thrift_workload_maintenanceStatus 0
thrift_workload_restartShards 0
thrift_workload_rewriteConfigs 0
thrift_workload_startJobUpdate 0
thrift_workload_startMaintenance 0
```

```
./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh

...

*** OK (All tests passed) ***

mesos-master start/running, process 2359
+ RETCODE=0
+ restore_netrc
+ mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
+ true
Connection to 127.0.0.1 closed.

real	28m58.389s
user	0m1.508s
sys	0m0.820s
```


Thanks,

Mehrdad Nurolahzade


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Mehrdad Nurolahzade <me...@nurolahzade.com>.

> On Jan. 24, 2017, 5:35 p.m., Reza Motamedi wrote:
> > src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java, line 510
> > <https://reviews.apache.org/r/55089/diff/2/?file=1593704#file1593704line510>
> >
> >     Should this be something like an atomic long?

{{tasksKilled}} is a local variable in method scope (not a field bound to a singleton object on the heap); there would be no concurrent access to it. Read more here: http://stackoverflow.com/questions/12825847/why-are-local-variables-thread-safe-in-java


- Mehrdad


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


On Dec. 29, 2016, 9:58 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 29, 2016, 9:58 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/Measured.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Reza Motamedi <re...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/#review162893
-----------------------------------------------------------




src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java (line 510)
<https://reviews.apache.org/r/55089/#comment234274>

    Should this be something like an atomic long?


- Reza Motamedi


On Dec. 30, 2016, 5:58 a.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2016, 5:58 a.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/Measured.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Mehrdad Nurolahzade <me...@nurolahzade.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/#review162821
-----------------------------------------------------------



Ping!

- Mehrdad Nurolahzade


On Dec. 29, 2016, 9:58 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 29, 2016, 9:58 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/Measured.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by David McLaughlin <da...@dmclaughlin.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/#review162968
-----------------------------------------------------------


Ship it!




Ship It!

- David McLaughlin


On Dec. 30, 2016, 5:58 a.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55089/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2016, 5:58 a.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Stephan Erb.
> 
> 
> Bugs: AURORA-1826
>     https://issues.apache.org/jira/browse/AURORA-1826
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1826	Expose Thrift server request workload stats
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/Measured.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
>   src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 
> 
> Diff: https://reviews.apache.org/r/55089/diff/
> 
> 
> Testing
> -------
> 
> ```
> curl 192.168.33.7:8081/vars | grep thrift_workload
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
> thrift_workload_addInstances 0
> thrift_workload_createJob 0
> thrift_workload_createOrUpdateCronTemplate 0
> thrift_workload_drainHosts 0
> thrift_workload_endMaintenance 0
> thrift_workload_getConfigSummary 0
> thrift_workload_getJobSummary 0
> thrift_workload_getJobUpdateDetails 0
> thrift_workload_getJobUpdateSummaries 0
> thrift_workload_getJobs 0
> thrift_workload_getPendingReason 0
> thrift_workload_getRoleSummary 0
> thrift_workload_getTaskStatus 0
> thrift_workload_getTasksWithoutConfigs 0
> thrift_workload_killTasks 0
> thrift_workload_maintenanceStatus 0
> thrift_workload_restartShards 0
> thrift_workload_rewriteConfigs 0
> thrift_workload_startJobUpdate 0
> thrift_workload_startMaintenance 0
> ```
> 
> ```
> ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> ...
> 
> *** OK (All tests passed) ***
> 
> mesos-master start/running, process 2359
> + RETCODE=0
> + restore_netrc
> + mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
> + true
> Connection to 127.0.0.1 closed.
> 
> real	28m58.389s
> user	0m1.508s
> sys	0m0.820s
> ```
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Re: Review Request 55089: AURORA-1826 Expose Thrift server request workload stats

Posted by Mehrdad Nurolahzade <me...@nurolahzade.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55089/
-----------------------------------------------------------

(Updated Dec. 29, 2016, 9:58 p.m.)


Review request for Aurora, David McLaughlin and Stephan Erb.


Changes
-------

- Automated stats collection on `ReadOnlyScheduler` methods through `ThriftStatsExporterInterceptor`
- Rolled back manual changes to `ReadOnlySchedulerImpl` and `ReadOnlySchedulerImplTest`


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


Repository: aurora


Description
-------

AURORA-1826	Expose Thrift server request workload stats


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 16b1b52f8691d978a9ec1bf7aa0c9716b3484cf0 
  src/main/java/org/apache/aurora/scheduler/thrift/aop/Measured.java PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptor.java d57f910d8f9bbe5c24aec960e88d03702bc353da 
  src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b28cd2489a52041a8e7e53f298fad8d8cd29406f 
  src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java 9c40ec51c28c8c57365dc21c3cd7391a3894784c 

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


Testing
-------

```
curl 192.168.33.7:8081/vars | grep thrift_workload
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41334    0 41334    0     0  3695k      0 --:--:-- --:--:-- --:--:-- 4036k
thrift_workload_addInstances 0
thrift_workload_createJob 0
thrift_workload_createOrUpdateCronTemplate 0
thrift_workload_drainHosts 0
thrift_workload_endMaintenance 0
thrift_workload_getConfigSummary 0
thrift_workload_getJobSummary 0
thrift_workload_getJobUpdateDetails 0
thrift_workload_getJobUpdateSummaries 0
thrift_workload_getJobs 0
thrift_workload_getPendingReason 0
thrift_workload_getRoleSummary 0
thrift_workload_getTaskStatus 0
thrift_workload_getTasksWithoutConfigs 0
thrift_workload_killTasks 0
thrift_workload_maintenanceStatus 0
thrift_workload_restartShards 0
thrift_workload_rewriteConfigs 0
thrift_workload_startJobUpdate 0
thrift_workload_startMaintenance 0
```

```
./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh

...

*** OK (All tests passed) ***

mesos-master start/running, process 2359
+ RETCODE=0
+ restore_netrc
+ mv /home/vagrant/.netrc.bak /home/vagrant/.netrc
+ true
Connection to 127.0.0.1 closed.

real	28m58.389s
user	0m1.508s
sys	0m0.820s
```


Thanks,

Mehrdad Nurolahzade