Search in sources :

Example 36 with Predicate

use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.

the class MergedAnomalyResultManagerImpl method findByCollectionTime.

@Override
public List<MergedAnomalyResultDTO> findByCollectionTime(String collection, long startTime, long endTime, boolean loadRawAnomalies) {
    Predicate predicate = Predicate.AND(Predicate.EQ("collection", collection), Predicate.GT("startTime", startTime), Predicate.LT("endTime", endTime));
    List<MergedAnomalyResultBean> list = genericPojoDao.get(predicate, MergedAnomalyResultBean.class);
    return batchConvertMergedAnomalyBean2DTO(list, loadRawAnomalies);
}
Also used : MergedAnomalyResultBean(com.linkedin.thirdeye.datalayer.pojo.MergedAnomalyResultBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 37 with Predicate

use of com.linkedin.thirdeye.datalayer.util.Predicate in project pinot by linkedin.

the class MergedAnomalyResultManagerImpl method findByStartTimeInRangeAndFunctionId.

@Override
public List<MergedAnomalyResultDTO> findByStartTimeInRangeAndFunctionId(long startTime, long endTime, long functionId) {
    Predicate predicate = Predicate.AND(Predicate.GE("startTime", startTime), Predicate.LT("endTime", endTime), 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 38 with Predicate

use of com.linkedin.thirdeye.datalayer.util.Predicate 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 39 with Predicate

use of com.linkedin.thirdeye.datalayer.util.Predicate 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 40 with Predicate

use of com.linkedin.thirdeye.datalayer.util.Predicate 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

Predicate (com.linkedin.thirdeye.datalayer.util.Predicate)53 ArrayList (java.util.ArrayList)19 DataCompletenessConfigBean (com.linkedin.thirdeye.datalayer.pojo.DataCompletenessConfigBean)9 MergedAnomalyResultBean (com.linkedin.thirdeye.datalayer.pojo.MergedAnomalyResultBean)7 MetricConfigDTO (com.linkedin.thirdeye.datalayer.dto.MetricConfigDTO)5 MetricConfigBean (com.linkedin.thirdeye.datalayer.pojo.MetricConfigBean)5 Transactional (com.google.inject.persist.Transactional)4 AutotuneConfigBean (com.linkedin.thirdeye.datalayer.pojo.AutotuneConfigBean)4 AnomalyFunctionDTO (com.linkedin.thirdeye.datalayer.dto.AnomalyFunctionDTO)3 DashboardConfigDTO (com.linkedin.thirdeye.datalayer.dto.DashboardConfigDTO)3 DatasetConfigDTO (com.linkedin.thirdeye.datalayer.dto.DatasetConfigDTO)3 EventDTO (com.linkedin.thirdeye.datalayer.dto.EventDTO)3 IngraphMetricConfigDTO (com.linkedin.thirdeye.datalayer.dto.IngraphMetricConfigDTO)3 TaskDTO (com.linkedin.thirdeye.datalayer.dto.TaskDTO)3 AnomalyFunctionBean (com.linkedin.thirdeye.datalayer.pojo.AnomalyFunctionBean)3 DashboardConfigBean (com.linkedin.thirdeye.datalayer.pojo.DashboardConfigBean)3 DatasetConfigBean (com.linkedin.thirdeye.datalayer.pojo.DatasetConfigBean)3 DetectionStatusBean (com.linkedin.thirdeye.datalayer.pojo.DetectionStatusBean)3 EmailConfigurationBean (com.linkedin.thirdeye.datalayer.pojo.EmailConfigurationBean)3 EventBean (com.linkedin.thirdeye.datalayer.pojo.EventBean)3