swagle commented on a change in pull request #5: [AMBARI-24723] Support wild 
cards in AppId and InstanceId fields in AMS GET API.
URL: https://github.com/apache/ambari-metrics/pull/5#discussion_r222190967
 
 

 ##########
 File path: 
ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/discovery/TimelineMetricMetadataManager.java
 ##########
 @@ -667,13 +681,17 @@ public TimelineMetric getMetricFromUuid(byte[] uuid) {
           }
           TimelineMetric metric = new TimelineMetric();
           metric.setMetricName(metricName);
-          metric.setAppId(appId);
-          metric.setInstanceId(instanceId);
           for (String hostname : sanitizedHostNames) {
             metric.setHostName(hostname);
-            byte[] uuid = getUuid(metric, false);
-            if (uuid != null) {
-              uuids.add(uuid);
+            for (String a : sanitizedAppIds) {
+              for (String i : sanitizedInstanceIds) {
+                metric.setAppId(a);
+                metric.setInstanceId(i);
+                byte[] uuid = getUuid(metric, false);
+                if (uuid != null) {
 
 Review comment:
   Shouldn't this if have an else which logs an error?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to