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 40585: AMBARI-14007 Fix precision issues in AMS
Date Sun, 22 Nov 2015 22:54:28 GMT

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

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


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


Repository: ambari


Description
-------

Problem
The following error is seen in the ambari server log when different time periods are selected
in the Host page.
19 Nov 2015 22:27:50,476 ERROR [qtp-client-79] MetricsRequestHelper:96 - Error getting timeline
metrics :
{"exception":"BadRequestException","message":"java.lang.Exception: Requested precision (SECONDS)
for given time range causes result set size of 15840, which exceeds the limit - 11520. Please
request higher precision.","javaClassName":"org.apache.hadoop.yarn.webapp.BadRequestException"}

Bug
The default metric service result limit of 11520 was not able to satisfy a couple of specific
cases of 22 host metrics requested for 2 hours in SECONDS precision.

Fix
1. Change default limit to 15840. Covers all time periods of all metric charts in Ambari web.


2. Introduce a simple 1 time retry mechanism in Ambari server according to which the server
retries AMS with the same request with higher precision if a request fails due to PrecisionLimitExceededException.

3. Fix bug in MetricsPaddingMethod where it throws an exception when there is no data to be
padded.


Diffs
-----

  ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java
900e5dd 
  ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/PrecisionLimitExceededException.java
PRE-CREATION 
  ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
b5998ee 
  ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/query/PhoenixTransactSQL.java
8962021 
  ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
a13086a 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
930cb91 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
730c6ec 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProvider.java
6bdc605 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelper.java
0eff41c 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheEntryFactory.java
9100afd 
  ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java cc1838b

  ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml
be698fc 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelperTest.java
PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheTest.java
53661fa 
  ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
fa3e365 

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


Testing
-------

Local Unit tests pass.

Submitted patch through Apache.

Added a new unit test to test MetricsRequestHelper.fetchTimelineMetrics for the normal case
and the Precision error retry case.


Thanks,

Aravindan Vijayan


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