use of com.linkedin.thirdeye.anomaly.detection.DetectionTaskInfo in project pinot by linkedin.
the class TaskGenerator method createDetectionTasks.
public List<DetectionTaskInfo> createDetectionTasks(DetectionJobContext detectionJobContext, List<DateTime> monitoringWindowStartTimes, List<DateTime> monitoringWindowEndTimes) throws Exception {
List<DetectionTaskInfo> tasks = new ArrayList<>();
AnomalyFunctionDTO anomalyFunctionSpec = detectionJobContext.getAnomalyFunctionSpec();
long jobExecutionId = detectionJobContext.getJobExecutionId();
// generate tasks
String exploreDimensionsString = anomalyFunctionSpec.getExploreDimensions();
if (StringUtils.isBlank(exploreDimensionsString)) {
DetectionTaskInfo taskInfo = new DetectionTaskInfo(jobExecutionId, monitoringWindowStartTimes, monitoringWindowEndTimes, anomalyFunctionSpec, null);
tasks.add(taskInfo);
} else {
DetectionTaskInfo taskInfo = new DetectionTaskInfo(jobExecutionId, monitoringWindowStartTimes, monitoringWindowEndTimes, anomalyFunctionSpec, exploreDimensionsString);
tasks.add(taskInfo);
}
return tasks;
}
use of com.linkedin.thirdeye.anomaly.detection.DetectionTaskInfo in project pinot by linkedin.
the class TestAnomalyTaskManager method getTestDetectionTaskInfo.
static DetectionTaskInfo getTestDetectionTaskInfo() {
DetectionTaskInfo taskInfo = new DetectionTaskInfo();
taskInfo.setWindowStartTime(Lists.newArrayList(new DateTime(), new DateTime().minusHours(1)));
taskInfo.setWindowEndTime(Lists.newArrayList(new DateTime(), new DateTime().minusHours(1)));
return taskInfo;
}
Aggregations