> On Jan. 19, 2016, 9:56 p.m., Sumit Mohanty wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java, > > line 458 > > <https://reviews.apache.org/r/42523/diff/1/?file=1202120#file1202120line458> > > > > Should it be hostname (plural)?
We support querying multiple hosts in 1 request, example: http://172.22.89.227:8080/api/v1/clusters/c1/host_components?HostRoles/component_name=DATANODE&fields=metrics/jvm/threadsRunnable[1453172400,1453174888,15] - Sid ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42523/#review115246 ----------------------------------------------------------- On Jan. 19, 2016, 9:50 p.m., Sid Wagle wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42523/ > ----------------------------------------------------------- > > (Updated Jan. 19, 2016, 9:50 p.m.) > > > Review request for Ambari, Aravindan Vijayan, Dmytro Sen, and Sumit Mohanty. > > > Bugs: AMBARI-14729 > https://issues.apache.org/jira/browse/AMBARI-14729 > > > Repository: ambari > > > Description > ------- > > API does not return metrics at the host component level (except for one host). > > STR. > Make a metrics API against various hosts for a specific metric. > Example on a 3-node cluster: > Call 1: > http://172.22.89.227:8080/api/v1/clusters/c1/hosts/sid-ams-3.novalocal/host_components/DATANODE?fields=metrics/load/load_five[1453147641,1453169241,15] > > This returns the metrics on sid-ams-3. > > Call 2: > http://172.22.89.227:8080/api/v1/clusters/c1/hosts/sid-ams-2.novalocal/host_components/DATANODE?fields=metrics/load/load_five[1453147641,1453169241,15] > > This returns no metrics data. > > Call 3: > http://172.22.89.227:8080/api/v1/clusters/c1/hosts/sid-ams-1.novalocal/host_components/DATANODE?fields=metrics/load/load_five[1453147641,1453169241,15] > > This returns no metrics data. > > The example above is for a system metric, but the same behavior is exhibited > for service metrics. > > For any given host component metric, only one of the hosts returns any > metric. The *first host that you make a query against* will return the > metrics data, but none of the other hosts. > This is because of the cache implementation. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java > b9f54db > > ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineAppMetricCacheKey.java > 76bc73b > > ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricsCacheSizeOfEngine.java > 2828a49 > > Diff: https://reviews.apache.org/r/42523/diff/ > > > Testing > ------- > > AMS unit tests pass. > Metrics cache unit test pass. > Manually verified. > > > Thanks, > > Sid Wagle > >
