Search in sources :

Example 11 with MergedAnomalyResultBean

use of com.linkedin.thirdeye.datalayer.pojo.MergedAnomalyResultBean in project pinot by linkedin.

the class MergedAnomalyResultManagerImpl method findAllConflictByFunctionId.

@Override
public List<MergedAnomalyResultDTO> findAllConflictByFunctionId(long functionId, long conflictWindowStart, long conflictWindowEnd) {
    Predicate predicate = Predicate.AND(Predicate.LT("startTime", conflictWindowEnd), Predicate.GE("endTime", conflictWindowStart), Predicate.EQ("functionId", functionId));
    List<MergedAnomalyResultBean> list = genericPojoDao.get(predicate, MergedAnomalyResultBean.class);
    return batchConvertMergedAnomalyBean2DTO(list, true);
}
Also used : MergedAnomalyResultBean(com.linkedin.thirdeye.datalayer.pojo.MergedAnomalyResultBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 12 with MergedAnomalyResultBean

use of com.linkedin.thirdeye.datalayer.pojo.MergedAnomalyResultBean in project pinot by linkedin.

the class MergedAnomalyResultManagerImpl method findUnNotifiedByFunctionIdAndIdLesserThanAndEndTimeGreaterThanLastOneDay.

public List<MergedAnomalyResultDTO> findUnNotifiedByFunctionIdAndIdLesserThanAndEndTimeGreaterThanLastOneDay(long functionId, long anomalyId) {
    Predicate predicate = Predicate.AND(Predicate.EQ("functionId", functionId), Predicate.LT("baseId", anomalyId), Predicate.EQ("notified", false), Predicate.GT("endTime", System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1)));
    List<MergedAnomalyResultBean> list = genericPojoDao.get(predicate, MergedAnomalyResultBean.class);
    return batchConvertMergedAnomalyBean2DTO(list, true);
}
Also used : MergedAnomalyResultBean(com.linkedin.thirdeye.datalayer.pojo.MergedAnomalyResultBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 13 with MergedAnomalyResultBean

use of com.linkedin.thirdeye.datalayer.pojo.MergedAnomalyResultBean in project pinot by linkedin.

the class MergedAnomalyResultManagerImpl method findAllConflictByFunctionIdDimensions.

@Override
public List<MergedAnomalyResultDTO> findAllConflictByFunctionIdDimensions(long functionId, long conflictWindowStart, long conflictWindowEnd, String dimensions) {
    Predicate predicate = Predicate.AND(Predicate.LE("startTime", conflictWindowEnd), Predicate.GE("endTime", conflictWindowStart), Predicate.EQ("functionId", functionId), Predicate.EQ("dimensions", dimensions));
    List<MergedAnomalyResultBean> list = genericPojoDao.get(predicate, MergedAnomalyResultBean.class);
    return batchConvertMergedAnomalyBean2DTO(list, true);
}
Also used : MergedAnomalyResultBean(com.linkedin.thirdeye.datalayer.pojo.MergedAnomalyResultBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Aggregations

MergedAnomalyResultBean (com.linkedin.thirdeye.datalayer.pojo.MergedAnomalyResultBean)13 Predicate (com.linkedin.thirdeye.datalayer.util.Predicate)7 MergedAnomalyResultDTO (com.linkedin.thirdeye.datalayer.dto.MergedAnomalyResultDTO)2 ArrayList (java.util.ArrayList)2 RawAnomalyResultDTO (com.linkedin.thirdeye.datalayer.dto.RawAnomalyResultDTO)1 AnomalyFeedbackBean (com.linkedin.thirdeye.datalayer.pojo.AnomalyFeedbackBean)1 EmailConfigurationBean (com.linkedin.thirdeye.datalayer.pojo.EmailConfigurationBean)1 HashMap (java.util.HashMap)1 ExecutionException (java.util.concurrent.ExecutionException)1 Future (java.util.concurrent.Future)1 TimeoutException (java.util.concurrent.TimeoutException)1