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_r222806686
 
 

 ##########
 File path: 
ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/query/TransientMetricCondition.java
 ##########
 @@ -42,22 +42,43 @@ public TransientMetricCondition(List<byte[]> uuids, 
List<String> metricNames, Li
     }
   }
 
+  public TransientMetricCondition(List<String> metricNames, List<String> 
hostnames, String appId,
+                                  String instanceId, Long startTime, Long 
endTime, Precision precision,
+                                  Integer limit, boolean grouped, List<String> 
transientMetricNames) {
+    super(metricNames, hostnames, appId, instanceId, startTime, endTime, 
precision, limit, grouped);
+    this.transientMetricNames = transientMetricNames;
+    if (CollectionUtils.isEmpty(hostnames)) {
+      this.hostnames = Collections.singletonList("%");
 
 Review comment:
   Does % match null?

----------------------------------------------------------------
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