This is an automated email from the ASF dual-hosted git repository.
xhsun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 30f3f0d [TE] allow empty urn for baseline (#4177)
30f3f0d is described below
commit 30f3f0d9afa582fcf3120532e9f6f8a79b3f7d41
Author: Xiaohui Sun <[email protected]>
AuthorDate: Tue Apr 30 13:56:49 2019 -0700
[TE] allow empty urn for baseline (#4177)
---
.../java/org/apache/pinot/thirdeye/detection/yaml/YamlResource.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlResource.java
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlResource.java
index 6fe2d52..5a6278d 100644
---
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlResource.java
+++
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlResource.java
@@ -649,7 +649,7 @@ public class YamlResource {
@QueryParam("urn") @NotNull String urn,
@QueryParam("tuningStart") long tuningStart,
@QueryParam("tuningEnd") long tuningEnd,
- @ApiParam("jsonPayload") String payload,
+ @ApiParam("jsonPayload") @NotNull String payload,
@QueryParam("ruleName") String ruleName) {
try {
Preconditions.checkArgument(StringUtils.isNotBlank(payload), "The Yaml
Payload in the request is empty.");
@@ -711,7 +711,7 @@ public class YamlResource {
MetricSlice slice = MetricSlice.from(metric.getId(), start, end,
metric.getFilters(), MetricSlice.NATIVE_GRANULARITY);
Optional<BaselineProvider> provider =
detectionConfig.getComponents().entrySet().stream()
- .filter(x -> x.getValue() instanceof BaselineProvider &&
(rule.isEmpty() || x.getKey().startsWith(rule)))
+ .filter(x -> x.getValue() instanceof BaselineProvider && (rule == null
|| rule.isEmpty() || x.getKey().startsWith(rule)))
.map(x -> (BaselineProvider) x.getValue())
.findFirst();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]