You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Aravindan Vijayan <av...@hortonworks.com> on 2015/11/13 01:47:24 UTC

Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

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

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


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


Repository: ambari


Description
-------

Problem
On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.

Bug
In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.

Fix
Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 

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


Testing
-------

Added unit test for new padding interval calculation method. Relevant unit tests pass. 

Submitted a patch at Apache to run other unit tests.


Thanks,

Aravindan Vijayan


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Sid Wagle <sw...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40270/#review106373
-----------------------------------------------------------

Ship it!


Ship It!

- Sid Wagle


On Nov. 13, 2015, 5:49 a.m., Aravindan Vijayan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40270/
> -----------------------------------------------------------
> 
> (Updated Nov. 13, 2015, 5:49 a.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-13863
>     https://issues.apache.org/jira/browse/AMBARI-13863
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Problem
> On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.
> 
> Bug
> In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.
> 
> Fix
> Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 
> 
> Diff: https://reviews.apache.org/r/40270/diff/
> 
> 
> Testing
> -------
> 
> Added unit test for new padding interval calculation method. Relevant unit tests pass. 
> 
> Submitted a patch at Apache to run other unit tests.
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Aravindan Vijayan <av...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40270/
-----------------------------------------------------------

(Updated Nov. 13, 2015, 5:49 a.m.)


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


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


Repository: ambari


Description
-------

Problem
On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.

Bug
In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.

Fix
Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 

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


Testing
-------

Added unit test for new padding interval calculation method. Relevant unit tests pass. 

Submitted a patch at Apache to run other unit tests.


Thanks,

Aravindan Vijayan


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Aravindan Vijayan <av...@hortonworks.com>.

> On Nov. 13, 2015, 3:33 a.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java, line 125
> > <https://reviews.apache.org/r/40270/diff/3/?file=1124708#file1124708line125>
> >
> >     Does this mean default seconds padding interval is 1 second?

The default padding interval is 1 second, which will happen only if the precision is SECOND and the number if points is 1.


- Aravindan


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


On Nov. 13, 2015, 1:25 a.m., Aravindan Vijayan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40270/
> -----------------------------------------------------------
> 
> (Updated Nov. 13, 2015, 1:25 a.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-13863
>     https://issues.apache.org/jira/browse/AMBARI-13863
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Problem
> On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.
> 
> Bug
> In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.
> 
> Fix
> Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 
> 
> Diff: https://reviews.apache.org/r/40270/diff/
> 
> 
> Testing
> -------
> 
> Added unit test for new padding interval calculation method. Relevant unit tests pass. 
> 
> Submitted a patch at Apache to run other unit tests.
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Sid Wagle <sw...@hortonworks.com>.

> On Nov. 13, 2015, 3:33 a.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java, line 125
> > <https://reviews.apache.org/r/40270/diff/3/?file=1124708#file1124708line125>
> >
> >     Does this mean default seconds padding interval is 1 second?
> 
> Aravindan Vijayan wrote:
>     The default padding interval is 1 second, which will happen only if the precision is SECOND and the number if points is 1.

That is too often lets use temporalInfo.getStep() or 15 seconds instead.


- Sid


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


On Nov. 13, 2015, 1:25 a.m., Aravindan Vijayan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40270/
> -----------------------------------------------------------
> 
> (Updated Nov. 13, 2015, 1:25 a.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-13863
>     https://issues.apache.org/jira/browse/AMBARI-13863
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Problem
> On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.
> 
> Bug
> In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.
> 
> Fix
> Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 
> 
> Diff: https://reviews.apache.org/r/40270/diff/
> 
> 
> Testing
> -------
> 
> Added unit test for new padding interval calculation method. Relevant unit tests pass. 
> 
> Submitted a patch at Apache to run other unit tests.
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Aravindan Vijayan <av...@hortonworks.com>.

> On Nov. 13, 2015, 3:33 a.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java, line 125
> > <https://reviews.apache.org/r/40270/diff/3/?file=1124708#file1124708line125>
> >
> >     Does this mean default seconds padding interval is 1 second?
> 
> Aravindan Vijayan wrote:
>     The default padding interval is 1 second, which will happen only if the precision is SECOND and the number if points is 1.
> 
> Sid Wagle wrote:
>     That is too often lets use temporalInfo.getStep() or 15 seconds instead.

Used temporalInfo.getStep()


- Aravindan


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


On Nov. 13, 2015, 5:49 a.m., Aravindan Vijayan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40270/
> -----------------------------------------------------------
> 
> (Updated Nov. 13, 2015, 5:49 a.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-13863
>     https://issues.apache.org/jira/browse/AMBARI-13863
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Problem
> On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.
> 
> Bug
> In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.
> 
> Fix
> Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 
> 
> Diff: https://reviews.apache.org/r/40270/diff/
> 
> 
> Testing
> -------
> 
> Added unit test for new padding interval calculation method. Relevant unit tests pass. 
> 
> Submitted a patch at Apache to run other unit tests.
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Sid Wagle <sw...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40270/#review106360
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java (line 119)
<https://reviews.apache.org/r/40270/#comment165095>

    Does this mean default seconds padding interval is 1 second?


- Sid Wagle


On Nov. 13, 2015, 1:25 a.m., Aravindan Vijayan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40270/
> -----------------------------------------------------------
> 
> (Updated Nov. 13, 2015, 1:25 a.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-13863
>     https://issues.apache.org/jira/browse/AMBARI-13863
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Problem
> On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.
> 
> Bug
> In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.
> 
> Fix
> Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 
> 
> Diff: https://reviews.apache.org/r/40270/diff/
> 
> 
> Testing
> -------
> 
> Added unit test for new padding interval calculation method. Relevant unit tests pass. 
> 
> Submitted a patch at Apache to run other unit tests.
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Aravindan Vijayan <av...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40270/
-----------------------------------------------------------

(Updated Nov. 13, 2015, 1:25 a.m.)


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


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


Repository: ambari


Description
-------

Problem
On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.

Bug
In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.

Fix
Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 

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


Testing
-------

Added unit test for new padding interval calculation method. Relevant unit tests pass. 

Submitted a patch at Apache to run other unit tests.


Thanks,

Aravindan Vijayan


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Aravindan Vijayan <av...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40270/
-----------------------------------------------------------

(Updated Nov. 13, 2015, 1:23 a.m.)


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


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


Repository: ambari


Description
-------

Problem
On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.

Bug
In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.

Fix
Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 

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


Testing
-------

Added unit test for new padding interval calculation method. Relevant unit tests pass. 

Submitted a patch at Apache to run other unit tests.


Thanks,

Aravindan Vijayan


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Sumit Mohanty <sm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40270/#review106350
-----------------------------------------------------------

Ship it!


Ship It!

- Sumit Mohanty


On Nov. 13, 2015, 12:47 a.m., Aravindan Vijayan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40270/
> -----------------------------------------------------------
> 
> (Updated Nov. 13, 2015, 12:47 a.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-13863
>     https://issues.apache.org/jira/browse/AMBARI-13863
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Problem
> On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.
> 
> Bug
> In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.
> 
> Fix
> Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 
> 
> Diff: https://reviews.apache.org/r/40270/diff/
> 
> 
> Testing
> -------
> 
> Added unit test for new padding interval calculation method. Relevant unit tests pass. 
> 
> Submitted a patch at Apache to run other unit tests.
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Aravindan Vijayan <av...@hortonworks.com>.

> On Nov. 13, 2015, 1:21 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java, line 106
> > <https://reviews.apache.org/r/40270/diff/1/?file=1124699#file1124699line106>
> >
> >     Is this comment out of place?

You are correct. It is unneeded.


- Aravindan


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


On Nov. 13, 2015, 1:23 a.m., Aravindan Vijayan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40270/
> -----------------------------------------------------------
> 
> (Updated Nov. 13, 2015, 1:23 a.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-13863
>     https://issues.apache.org/jira/browse/AMBARI-13863
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Problem
> On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.
> 
> Bug
> In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.
> 
> Fix
> Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 
> 
> Diff: https://reviews.apache.org/r/40270/diff/
> 
> 
> Testing
> -------
> 
> Added unit test for new padding interval calculation method. Relevant unit tests pass. 
> 
> Submitted a patch at Apache to run other unit tests.
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>


Re: Review Request 40270: AMBARI-13863 UI lags and OutOfMemoryError seen in Ambari server after dashboard metrics' time periods are changed.

Posted by Sumit Mohanty <sm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40270/#review106349
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java (line 100)
<https://reviews.apache.org/r/40270/#comment165083>

    Is this comment out of place?


- Sumit Mohanty


On Nov. 13, 2015, 12:47 a.m., Aravindan Vijayan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40270/
> -----------------------------------------------------------
> 
> (Updated Nov. 13, 2015, 12:47 a.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-13863
>     https://issues.apache.org/jira/browse/AMBARI-13863
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Problem
> On the Ambari dashboard page, when different time ranges are randomly chosen, the metrics charts stop responding and an OutOfMemory is seen in the Ambari server logs.
> 
> Bug
> In the AMS cache layer, the logic to pad the cache entry map by looking at the delta between the values present in the map. When there is only one data point, it assumes a default pad interval of 15 seconds even if the actual data precision could be in minutes/hours/days.
> 
> Fix
> Change the padding interval logic to use the precision calculated using the requested start and end time. If the precision is in SECONDS, the delta between the values in the map are used.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java ccfb713 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b35295d 
> 
> Diff: https://reviews.apache.org/r/40270/diff/
> 
> 
> Testing
> -------
> 
> Added unit test for new padding interval calculation method. Relevant unit tests pass. 
> 
> Submitted a patch at Apache to run other unit tests.
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>