use of com.linkedin.thirdeye.anomaly.monitor.MonitorTaskInfo in project pinot by linkedin.
the class TaskGenerator method createMonitorTasks.
public List<MonitorTaskInfo> createMonitorTasks(MonitorJobContext monitorJobContext) {
List<MonitorTaskInfo> tasks = new ArrayList<>();
// TODO: Currently generates 1 task for updating all the completed jobs
// We might need to create more tasks and assign only certain number of updations to each (say 5k)
MonitorTaskInfo updateTaskInfo = new MonitorTaskInfo();
updateTaskInfo.setMonitorType(MonitorType.UPDATE);
tasks.add(updateTaskInfo);
MonitorConfiguration monitorConfiguration = monitorJobContext.getMonitorConfiguration();
MonitorTaskInfo expireTaskInfo = new MonitorTaskInfo();
expireTaskInfo.setMonitorType(MonitorType.EXPIRE);
expireTaskInfo.setExpireDaysAgo(monitorConfiguration.getExpireDaysAgo());
tasks.add(expireTaskInfo);
return tasks;
}
Aggregations