ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aravindan Vijayan" <avija...@hortonworks.com>
Subject Review Request 40203: AMBARI-13705 Metrics Cache sizing test failing on trunk
Date Wed, 11 Nov 2015 23:41:48 GMT

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

Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.


Bugs: AMBARI-13705
    https://issues.apache.org/jira/browse/AMBARI-13705


Repository: ambari


Description
-------

Problem

The TimelineMetricCacheSizingTest is used to test the accuracy of the Custom CacheSizing engine
written for AMS cache on the ambari server side. The test asserts the discrepancy between
the actual size of the Cache entry vs the computed size to be less than 10kB. The test passed
locally on a 64bit JVM and failed on Apache builds where a 32it JVM was used.

Bug
The TreeMap entry overhead size calculated by the custom size of engine was specific to 64bit.


Fix
Changed the size calculation of a TreeMap entry overhead to a runtime logic. 
  
SizeOfMapEntryOverhead = SizeOfMapWithOneEntry - (SizeOfEmptyMap + SizeOfOneEntry)


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricsCacheSizeOfEngine.java
757bfb7 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheSizingTest.java
1e90181 

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


Testing
-------

Relevant tests pass locally as well as on Apache.


Thanks,

Aravindan Vijayan


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