You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ji...@apache.org on 2020/07/22 22:04:31 UTC

[incubator-pinot] 01/01: [TE] deprecate the yaml/list endpoint

This is an automated email from the ASF dual-hosted git repository.

jihao pushed a commit to branch yaml-list-deprecation
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit aead9bae2a73dae91e0a73397e397cf8bd7c197e
Author: Jihao Zhang <ji...@linkedin.com>
AuthorDate: Wed Jul 22 15:04:07 2020 -0700

    [TE] deprecate the yaml/list endpoint
---
 .../org/apache/pinot/thirdeye/detection/yaml/YamlResource.java | 10 +++++++---
 1 file changed, 7 insertions(+), 3 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 c8601fe..7910bc0 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
@@ -1067,14 +1067,14 @@ public class YamlResource {
     List<Map<String, Object>> yamls;
     if (dataset == null && metric == null) {
       yamls = this.detectionConfigDAO
-          .findAll()
+          .list(100, 0)
           .parallelStream()
           .map(config -> formatConfigOrNull(config))
           .filter(c -> c!= null)
           .collect(Collectors.toList());
     } else {
       yamls = this.detectionConfigDAO
-          .findAll()
+          .list(100, 0)
           .parallelStream()
           .map(config -> formatConfigOrNull(config))
           .filter(c -> c!= null)
@@ -1096,8 +1096,12 @@ public class YamlResource {
    */
   @GET
   @Path("/list")
-  @ApiOperation("Get the list of all detection YAML configurations as JSON enhanced with additional information, optionally filtered.")
+  @ApiOperation(
+      "Get the list of all detection YAML configurations as JSON enhanced with additional information, optionally filtered."
+          + "IMPORTANT NOTE: This endpoint is deprecated because it is not scalable. Please use the /alerts endpoint instead. "
+          + "For now, it is limited to list and filter the most recent 100 alerts only. ")
   @Produces(MediaType.APPLICATION_JSON)
+  @Deprecated
   public Response listYamls(
       @ApiParam("Dataset the detection configurations should be filtered by") @QueryParam("dataset") String dataset,
       @ApiParam("Metric the detection configurations should be filtered by") @QueryParam("metric") String metric){


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org