use of com.linkedin.thirdeye.anomaly.task.TaskResult in project pinot by linkedin.
the class AlertTaskRunnerV2 method execute.
@Override
public List<TaskResult> execute(TaskInfo taskInfo, TaskContext taskContext) throws Exception {
List<TaskResult> taskResult = new ArrayList<>();
AlertTaskInfo alertTaskInfo = (AlertTaskInfo) taskInfo;
alertConfig = alertTaskInfo.getAlertConfigDTO();
thirdeyeConfig = taskContext.getThirdEyeAnomalyConfiguration();
alertFilterFactory = new AlertFilterFactory(thirdeyeConfig.getAlertFilterConfigPath());
try {
LOG.info("Begin executing task {}", taskInfo);
runTask();
} catch (Exception t) {
LOG.error("Task failed with exception:", t);
sendFailureEmail(t);
// Let task driver mark this task failed
throw t;
}
return taskResult;
}
Aggregations