You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Zameer Manji <zm...@apache.org> on 2016/04/06 19:48:41 UTC

Review Request 45821: Implement custom MyBatis cache to record cache statistics.

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

Review request for Aurora, Maxim Khutornenko and Bill Farner.


Repository: aurora


Description
-------

This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.


Diffs
-----

  src/main/java/org/apache/aurora/scheduler/storage/db/MybatisCacheImpl.java PRE-CREATION 
  src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 

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


Testing
-------

Saw metrics in vagrant environment.


Thanks,

Zameer Manji


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

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



Master (ddbb965) is red with this patch.
  ./build-support/jenkins/build.sh


:commons-args:compileJava
:commons-args:processResources
:commons-args:classes
:commons-args:jar
:commons:compileJavaNote: Writing file:/home/jenkins/jenkins-slave/workspace/AuroraBot/commons/dist/classes/main/org/apache/aurora/common/args/apt/cmdline.arg.info.txt.1
Note: Writing file:/home/jenkins/jenkins-slave/workspace/AuroraBot/commons/dist/classes/main/META-INF/compiler/resource-mappings/org.apache.aurora.common.args.apt.CmdLineProcessor
Note: /home/jenkins/jenkins-slave/workspace/AuroraBot/commons/src/main/java/org/apache/aurora/common/testing/easymock/EasyMockTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

:commons:generateThriftResources
:commons:processResources
:commons:classes
:commons:jar
:compileJava/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/storage/db/MybatisCacheImpl.java:29: error: class MyBatisCacheImpl is public, should be declared in a file named MyBatisCacheImpl.java
public class MyBatisCacheImpl implements Cache {
       ^
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java:82: error: cannot find symbol
class WriteAheadStorage extends WriteAheadStorageForwarder implements
                                ^
  symbol: class WriteAheadStorageForwarder
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java:82: error: WriteAheadStorage is not abstract and does not override abstract method fetchFrameworkId() in SchedulerStore
class WriteAheadStorage extends WriteAheadStorageForwarder implements
^
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 36.705 secs


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

- Aurora ReviewBot


On April 6, 2016, 5:48 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 5:48 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MybatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45821/#review127439
-----------------------------------------------------------



@ReviewBot retry

- Zameer Manji


On April 6, 2016, 11:10 a.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 11:10 a.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

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



Master (ddbb965) is red with this patch.
  ./build-support/jenkins/build.sh

                           with temporary_dir() as checkpoint_root:
                             te = AuroraExecutor(
                     >           runner_provider=make_provider(checkpoint_root),
                                 sandbox_provider=DefaultTestSandboxProvider())
                     
                     src/test/python/apache/aurora/executor/test_thermos_executor.py:580: 
                     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
                     src/test/python/apache/aurora/executor/test_thermos_executor.py:193: in make_provider
                         pex_location=thermos_runner_path(),
                     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
                     
                     build = True
                     
                         def thermos_runner_path(build=True):
                           if not build:
                             return getattr(thermos_runner_path, 'value', None)
                         
                           if not hasattr(thermos_runner_path, 'value'):
                             pex_dir = safe_mkdtemp()
                     >       assert subprocess.call(["./pants", "--pants-distdir=%s" % pex_dir, "binary",
                               "src/main/python/apache/thermos/runner:thermos_runner"]) == 0
                     E       assert 1 == 0
                     E        +  where 1 = <function call at 0x7febb1d52b18>(['./pants', '--pants-distdir=/tmp/user/10021/tmpTOHoWH', 'binary', 'src/main/python/apache/thermos/runner:thermos_runner'])
                     E        +    where <function call at 0x7febb1d52b18> = subprocess.call
                     
                     src/test/python/apache/aurora/executor/test_thermos_executor.py:185: AssertionError
                     -------------- Captured stderr call --------------
                     Traceback (most recent call last):
                       File "/home/jenkins/.cache/pants/setup/bootstrap-Linux-x86_64/0.0.80/bin/pants", line 7, in <module>
                         from pants.bin.pants_exe import main
                     ImportError: No module named pants.bin.pants_exe
                      generated xml file: /home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/415337499eb72578eab327a6487c1f5c9452b3d6.xml 
                      16 failed, 641 passed, 5 skipped, 1 warnings, 8 error in 154.17 seconds 
                     
FAILURE


               Waiting for background workers to finish.
19:08:25 03:38   [complete]
               FAILURE


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

- Aurora ReviewBot


On April 6, 2016, 6:10 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 6:10 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

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



Master (103dae6) is red with this patch.
  ./build-support/jenkins/build.sh

                           with temporary_dir() as checkpoint_root:
                             te = AuroraExecutor(
                     >           runner_provider=make_provider(checkpoint_root),
                                 sandbox_provider=DefaultTestSandboxProvider())
                     
                     src/test/python/apache/aurora/executor/test_thermos_executor.py:580: 
                     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
                     src/test/python/apache/aurora/executor/test_thermos_executor.py:193: in make_provider
                         pex_location=thermos_runner_path(),
                     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
                     
                     build = True
                     
                         def thermos_runner_path(build=True):
                           if not build:
                             return getattr(thermos_runner_path, 'value', None)
                         
                           if not hasattr(thermos_runner_path, 'value'):
                             pex_dir = safe_mkdtemp()
                     >       assert subprocess.call(["./pants", "--pants-distdir=%s" % pex_dir, "binary",
                               "src/main/python/apache/thermos/runner:thermos_runner"]) == 0
                     E       assert 1 == 0
                     E        +  where 1 = <function call at 0x7f118bb37938>(['./pants', '--pants-distdir=/tmp/user/20000/tmp_fSutN', 'binary', 'src/main/python/apache/thermos/runner:thermos_runner'])
                     E        +    where <function call at 0x7f118bb37938> = subprocess.call
                     
                     src/test/python/apache/aurora/executor/test_thermos_executor.py:185: AssertionError
                     -------------- Captured stderr call --------------
                     Traceback (most recent call last):
                       File "/home/jenkins/.cache/pants/setup/bootstrap-Linux-x86_64/0.0.80/bin/pants", line 7, in <module>
                         from pants.bin.pants_exe import main
                     ImportError: No module named pants.bin.pants_exe
                      generated xml file: /home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/415337499eb72578eab327a6487c1f5c9452b3d6.xml 
                      20 failed, 637 passed, 5 skipped, 1 warnings, 8 error in 215.34 seconds 
                     
FAILURE


               Waiting for background workers to finish.
21:01:29 04:59   [complete]
               FAILURE


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

- Aurora ReviewBot


On April 6, 2016, 8:47 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 8:47 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

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



Master (103dae6) is red with this patch.
  ./build-support/jenkins/build.sh

                           self._clock.converge(threads=[hct.threaded_health_checker])
                           self._clock.assert_waiting(hct.threaded_health_checker, amount=1)  # interval_secs
                           assert hct._total_latency == 0.5
                           assert hct.metrics.sample()['total_latency_secs'] == 0.5
                           assert hct.metrics.sample()['checks'] == 1
                         
                           # tick again
                           self._clock.tick(1.0 + epsilon)
                           self._clock.converge(threads=[hct.threaded_health_checker])
                           self._clock.tick(0.5 + epsilon)
                           self._clock.converge(threads=[hct.threaded_health_checker])
                           self._clock.assert_waiting(hct.threaded_health_checker, amount=1)  # interval_secs
                     >     assert hct._total_latency == 1.0
                     E     AssertionError: assert 1.001 == 1.0
                     E      +  where 1.001 = <apache.aurora.executor.common.health_checker.HealthChecker object at 0x7f18687cc910>._total_latency
                     
                     src/test/python/apache/aurora/executor/common/test_health_checker.py:184: AssertionError
                     -------------- Captured stderr call --------------
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 0.0
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 0.0
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 1.0
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 1.001
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 1.001
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 1.501
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 1.502
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 1.502
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 2.502
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 2.503
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 2.503
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 3.003
                     [<twitter.common.testing.clock.ThreadedClock object at 0x7f18687ccd50>] Time now: 3.004
                      generated xml file: /home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/415337499eb72578eab327a6487c1f5c9452b3d6.xml 
                      1 failed, 664 passed, 5 skipped, 1 warnings in 313.91 seconds 
                     
FAILURE


               Waiting for background workers to finish.
23:19:52 07:56   [complete]
               FAILURE


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

- Aurora ReviewBot


On April 6, 2016, 10:35 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 10:35 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
>   src/test/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImplTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45821/
-----------------------------------------------------------

(Updated April 6, 2016, 3:35 p.m.)


Review request for Aurora, Maxim Khutornenko and Bill Farner.


Changes
-------

Add unit test.


Repository: aurora


Description
-------

This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
  src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
  src/test/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImplTest.java PRE-CREATION 

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


Testing
-------

Saw metrics in vagrant environment.


Thanks,

Zameer Manji


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

Posted by Bill Farner <wf...@apache.org>.

> On April 6, 2016, 3:16 p.m., Bill Farner wrote:
> >

Whoops, should have been a "Fix it, then ship it!"


- Bill


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


On April 6, 2016, 2:52 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 2:52 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

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


Ship it!





src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java (line 30)
<https://reviews.apache.org/r/45821/#comment190813>

    Needs a unit test.


- Bill Farner


On April 6, 2016, 2:52 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 2:52 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

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



Master (103dae6) is red with this patch.
  ./build-support/jenkins/build.sh

Note: Recompile with -Xlint:deprecation for details.

:processJmhResources UP-TO-DATE
:jmhClasses
:checkstyleJmh
:jsHint
:checkstyleMain
:compileTestJava/home/jenkins/jenkins-slave/workspace/AuroraBot/src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java:38: Note: Wrote forwarder org.apache.aurora.scheduler.thrift.aop.MockDecoratedThriftForwarder
@Forward(AnnotatedAuroraAdmin.class)
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:processTestResources
:testClasses
:checkstyleTest
:findbugsJmh
:findbugsMain
:findbugsTest
:licenseJmh UP-TO-DATE
:licenseMain UP-TO-DATE
:licenseTest UP-TO-DATE
:license UP-TO-DATE
:pmdJmh
:pmdMain
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java:34:	Private field 'clearCount' could be made final; it is only initialized in the declaration or constructor.
:pmdMain FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':pmdMain'.
> 1 PMD rule violations were found. See the report at: file:///home/jenkins/jenkins-slave/workspace/AuroraBot/dist/reports/pmd/main.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 55.518 secs


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

- Aurora ReviewBot


On April 6, 2016, 9:52 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 9:52 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45821/
-----------------------------------------------------------

(Updated April 6, 2016, 2:52 p.m.)


Review request for Aurora, Maxim Khutornenko and Bill Farner.


Changes
-------

Add stat for clear actions requested by MyBatis.


Repository: aurora


Description
-------

This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
  src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 

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


Testing
-------

Saw metrics in vagrant environment.


Thanks,

Zameer Manji


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45821/
-----------------------------------------------------------

(Updated April 6, 2016, 1:47 p.m.)


Review request for Aurora, Maxim Khutornenko and Bill Farner.


Changes
-------

Add Size.


Repository: aurora


Description
-------

This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
  src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 

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


Testing
-------

Saw metrics in vagrant environment.


Thanks,

Zameer Manji


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45821/#review127440
-----------------------------------------------------------


Ship it!




Ship It!

- Maxim Khutornenko


On April 6, 2016, 6:10 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 6:10 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

Posted by Zameer Manji <zm...@apache.org>.

> On April 6, 2016, 11:46 a.m., Maxim Khutornenko wrote:
> > src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java, line 35
> > <https://reviews.apache.org/r/45821/diff/2/?file=1328514#file1328514line35>
> >
> >     What ID value do we get here? Is it descriptive enough to identify if it's from TaskMapper or TaskConfigMapper?

The id the FQN of the mapper. An example would be `org.apache.aurora.scheduler.storage.db.TaskConfigMapper`. So yes we would be able to tell the difference.


- Zameer


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


On April 6, 2016, 11:10 a.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 11:10 a.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45821/#review127408
-----------------------------------------------------------




src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java (line 35)
<https://reviews.apache.org/r/45821/#comment190706>

    What ID value do we get here? Is it descriptive enough to identify if it's from TaskMapper or TaskConfigMapper?


- Maxim Khutornenko


On April 6, 2016, 6:10 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45821/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 6:10 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 
> 
> Diff: https://reviews.apache.org/r/45821/diff/
> 
> 
> Testing
> -------
> 
> Saw metrics in vagrant environment.
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 45821: Implement custom MyBatis cache to record cache statistics.

Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45821/
-----------------------------------------------------------

(Updated April 6, 2016, 11:10 a.m.)


Review request for Aurora, Maxim Khutornenko and Bill Farner.


Changes
-------

Force rename to appease git


Repository: aurora


Description
-------

This swaps out our use of the mybatis default cache with a custom one backed by Guava. The benefit of this is that we can now plumb cache statistics out which is helpful in debugging performance problems with MyBatis.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/storage/db/MyBatisCacheImpl.java PRE-CREATION 
  src/main/resources/org/apache/aurora/scheduler/storage/db/AttributeMapper.xml 41519dee391a37ff4904b6c52dc276d278b85f1f 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml fd272ccf9b1cfccd9198d1e5e0db37d23f546afa 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskMapper.xml 0219bf3da01936824154675ac812bc53cb308d3f 

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


Testing
-------

Saw metrics in vagrant environment.


Thanks,

Zameer Manji