xiaohui-sun commented on a change in pull request #4217: [TE] distribute
detection and notification tasks
URL: https://github.com/apache/incubator-pinot/pull/4217#discussion_r285311895
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/CompositePipelineConfigTranslator.java
##########
@@ -379,16 +380,24 @@ private void fillInDetectorWrapperProperties(Map<String,
Object> properties, Map
return properties;
}
+ // Default schedule:
+ // minute granularity: every 15 minutes, starts at 0 minute
+ // hourly: every hour, starts at 0 minute
+ // daily: every day, starts at 2 pm UTC
+ // others: every day, start at 12 am UTC
private String buildCron() {
+ // starts at random second to reduce task spike
+ Random random = new Random();
+ String second = Integer.toString(random.nextInt(59));
switch (this.datasetConfig.bucketTimeGranularity().getUnit()) {
case MINUTES:
- return "0 0/15 * * * ? *";
+ return second + " 0/15 * * * ? *";
Review comment:
Makes sense. Will add more buffer when loading the task.
----------------------------------------------------------------
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]