TopN is a useful feature in analyzing and finding the outlier in large clusters.
2 Use Cases where meant to be solved through this story.
Display the series for Top N hosts for a specific metric.
Display the Top N metrics (Users / HBase table metrics) for a given host or aggregated across all hosts
To facilitate the above, the following are supported.
> Top "N" hosts when 1 metric is requested for "H" hosts.
> Top "N" metrics when "M" metrics (or a pattern) are requested for 0 or 1 hosts.
> Default TopN Hosts when More than a specific value of hosts are requested. Default = 20. Configurable through ams-site config (timeline.metrics.default.topn.hosts.limit)
TopN API Example
topN - Mandatory parameter for TopN query which denotes the number of series to be returned.
topNFunction - Optional parameter to specificy the comparator function for comparing 2 series while ordering. Default = max, Valid Values (max,avg,sum)
isBottomN - Optional parameter. If bottom N series are required instead of top N. Default = false.