jihaozh commented on a change in pull request #3966: [TE] detection - merger
max duration validation
URL: https://github.com/apache/incubator-pinot/pull/3966#discussion_r265341811
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/MergeWrapper.java
##########
@@ -87,7 +87,7 @@ public MergeWrapper(DataProvider provider,
DetectionConfigDTO config, long start
this.maxGap = MapUtils.getLongValue(config.getProperties(), "maxGap",
TimeUnit.HOURS.toMillis(2));
this.maxDuration = MapUtils.getLongValue(config.getProperties(),
"maxDuration", Long.MAX_VALUE);
- Preconditions.checkArgument(this.maxDuration > 0, "Max duration must be a
positive number.");
+ Preconditions.checkArgument(this.maxDuration > 0 && this.maxDuration <=
TimeUnit.MINUTES.toMillis(15), "Max duration must be a positive number and more
than 15 minutes");
Review comment:
Yeah. I'll just check the number of anomalies instead.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]