This is an automated email from the ASF dual-hosted git repository. akshayrai09 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 8f0145e [TE] update schema to support window parameters (#5933) 8f0145e is described below commit 8f0145eb39ed84b53c9c4b858b5d9662a4386941 Author: Akshay Rai <ak...@linkedin.com> AuthorDate: Thu Aug 27 16:16:31 2020 -0700 [TE] update schema to support window parameters (#5933) --- .../detection/wrapper/AnomalyDetectorWrapper.java | 5 ++- .../detection/detection-config-schema.json | 51 +++++++++++++++++++--- .../subscription/subscription-config-schema.json | 3 ++ .../composite-detection-config-good-1.yaml | 4 ++ 4 files changed, 56 insertions(+), 7 deletions(-) diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java index cf8621a..52cc63a 100644 --- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java +++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java @@ -69,8 +69,9 @@ import static org.apache.pinot.thirdeye.detection.yaml.translator.DetectionConfi */ public class AnomalyDetectorWrapper extends DetectionPipeline { private static final String PROP_METRIC_URN = "metricUrn"; + private static final String PROP_DETECTOR_COMPONENT_NAME = "detectorComponentName"; - // moving window detection properties + // moving window detection properties (configurable in yaml) private static final String PROP_MOVING_WINDOW_DETECTION = "isMovingWindowDetection"; private static final String PROP_WINDOW_DELAY = "windowDelay"; private static final String PROP_WINDOW_DELAY_UNIT = "windowDelayUnit"; @@ -78,10 +79,10 @@ public class AnomalyDetectorWrapper extends DetectionPipeline { private static final String PROP_WINDOW_UNIT = "windowUnit"; private static final String PROP_FREQUENCY = "frequency"; private static final String PROP_DETECTOR = "detector"; - private static final String PROP_DETECTOR_COMPONENT_NAME = "detectorComponentName"; private static final String PROP_TIMEZONE = "timezone"; private static final String PROP_BUCKET_PERIOD = "bucketPeriod"; private static final String PROP_CACHE_PERIOD_LOOKBACK = "cachingPeriodLookback"; + // fail detection job if it failed successively for the first 5 windows private static final long EARLY_TERMINATE_WINDOW = 5; // expression to consolidate the time series diff --git a/thirdeye/thirdeye-pinot/src/main/resources/validators/detection/detection-config-schema.json b/thirdeye/thirdeye-pinot/src/main/resources/validators/detection/detection-config-schema.json index ced3f61..8a07d24 100644 --- a/thirdeye/thirdeye-pinot/src/main/resources/validators/detection/detection-config-schema.json +++ b/thirdeye/thirdeye-pinot/src/main/resources/validators/detection/detection-config-schema.json @@ -146,7 +146,48 @@ } }, - "eachComponent": { + "anomalyDetectorComponent": { + "type": "array", + "items": { + "type": "object", + "required": [ "type", "name" ], + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "params": { + "type": "object" + }, + "windowDelay": { + "type": "number" + }, + "windowDelayUnit": { + "type": "string" + }, + "windowSize": { + "type": "number" + }, + "windowUnit": { + "type": "string" + }, + "bucketPeriod": { + "type": "string" + }, + "timeZone": { + "type": "string" + }, + "cachingPeriodLookback": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + + "genericComponent": { "type": "array", "items": { "type": "object", @@ -174,13 +215,13 @@ "required": [ "detection" ], "properties": { "detection": { - "$ref": "#/definitions/eachComponent" + "$ref": "#/definitions/anomalyDetectorComponent" }, "filter": { - "$ref": "#/definitions/eachComponent" + "$ref": "#/definitions/genericComponent" }, "quality": { - "$ref": "#/definitions/eachComponent" + "$ref": "#/definitions/genericComponent" } }, "additionalProperties": false @@ -206,7 +247,7 @@ }, "grouper": { - "$ref": "#/definitions/eachComponent" + "$ref": "#/definitions/genericComponent" } }, diff --git a/thirdeye/thirdeye-pinot/src/main/resources/validators/subscription/subscription-config-schema.json b/thirdeye/thirdeye-pinot/src/main/resources/validators/subscription/subscription-config-schema.json index 58b6bfa..d189a0c 100644 --- a/thirdeye/thirdeye-pinot/src/main/resources/validators/subscription/subscription-config-schema.json +++ b/thirdeye/thirdeye-pinot/src/main/resources/validators/subscription/subscription-config-schema.json @@ -16,6 +16,9 @@ "type": { "type": "string" }, + "active": { + "type": "boolean" + }, "cron": { "type": "string" }, diff --git a/thirdeye/thirdeye-pinot/src/test/resources/org/apache/pinot/thirdeye/detection/validators/composite-detection-config-good-1.yaml b/thirdeye/thirdeye-pinot/src/test/resources/org/apache/pinot/thirdeye/detection/validators/composite-detection-config-good-1.yaml index 024ac69..420576e 100644 --- a/thirdeye/thirdeye-pinot/src/test/resources/org/apache/pinot/thirdeye/detection/validators/composite-detection-config-good-1.yaml +++ b/thirdeye/thirdeye-pinot/src/test/resources/org/apache/pinot/thirdeye/detection/validators/composite-detection-config-good-1.yaml @@ -22,6 +22,10 @@ alerts: - detection: - type: THRESHOLD name: maxThreshold_1 + windowUnit: DAYS + bucketPeriod: P7D + windowSize: 7 + timeZone: America/Los_Angeles params: max: 100 filter: --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org