Search in sources :

Example 11 with Predicate

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

the class RawAnomalyResultManagerImpl method findAllByTimeAndFunctionId.

public List<RawAnomalyResultDTO> findAllByTimeAndFunctionId(long startTime, long endTime, long functionId) {
    Predicate startTimePredicate;
    startTimePredicate = Predicate.AND(Predicate.GE("startTime", startTime), Predicate.LE("startTime", endTime));
    Predicate endTimeTimePredicate;
    endTimeTimePredicate = Predicate.AND(Predicate.GE("endTime", startTime), Predicate.LE("endTime", endTime));
    ;
    Predicate functionIdPredicate = Predicate.EQ("functionId", functionId);
    Predicate finalPredicate = Predicate.AND(functionIdPredicate, Predicate.OR(endTimeTimePredicate, startTimePredicate));
    return findByPredicate(finalPredicate);
}
Also used : Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 12 with Predicate

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

the class AutotuneConfigManagerImpl method findAllByFunctionId.

@Override
public List<AutotuneConfigDTO> findAllByFunctionId(long functionId) {
    Predicate predicate = Predicate.EQ(FUNCTION_ID, functionId);
    List<AutotuneConfigBean> list = genericPojoDao.get(predicate, AutotuneConfigBean.class);
    return beansToDTOs(list);
}
Also used : AutotuneConfigBean(com.linkedin.thirdeye.datalayer.pojo.AutotuneConfigBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 13 with Predicate

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

the class AutotuneConfigManagerImpl method findAllByFunctionIdAndAutotuneMethod.

@Override
public List<AutotuneConfigDTO> findAllByFunctionIdAndAutotuneMethod(long functionId, String autoTuneMethod) {
    Predicate predicate = Predicate.AND(Predicate.EQ(FUNCTION_ID, functionId), Predicate.EQ(AUTOTUNE_METHOD, autoTuneMethod));
    List<AutotuneConfigBean> list = genericPojoDao.get(predicate, AutotuneConfigBean.class);
    return beansToDTOs(list);
}
Also used : AutotuneConfigBean(com.linkedin.thirdeye.datalayer.pojo.AutotuneConfigBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 14 with Predicate

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

the class AutotuneConfigManagerImpl method findAllByFuctionIdAndWindow.

@Override
public List<AutotuneConfigDTO> findAllByFuctionIdAndWindow(long functionId, long startTime, long endTime) {
    Predicate predicate = Predicate.AND(Predicate.EQ(FUNCTION_ID, functionId), Predicate.GE(START_TIME, startTime), Predicate.LE(END_TIME, endTime));
    List<AutotuneConfigBean> list = genericPojoDao.get(predicate, AutotuneConfigBean.class);
    return beansToDTOs(list);
}
Also used : AutotuneConfigBean(com.linkedin.thirdeye.datalayer.pojo.AutotuneConfigBean) Predicate(com.linkedin.thirdeye.datalayer.util.Predicate)

Example 15 with Predicate

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

the class IngraphMetricConfigManagerImpl method findByDashboard.

@Override
public List<IngraphMetricConfigDTO> findByDashboard(String dashboardName) {
    Predicate predicate = Predicate.EQ("dashboardName", dashboardName);
    List<IngraphMetricConfigBean> list = genericPojoDao.get(predicate, IngraphMetricConfigBean.class);
    List<IngraphMetricConfigDTO> result = new ArrayList<>();
    for (IngraphMetricConfigBean abstractBean : list) {
        IngraphMetricConfigDTO dto = MODEL_MAPPER.map(abstractBean, IngraphMetricConfigDTO.class);
        result.add(dto);
    }
    return result;
}
Also used : IngraphMetricConfigBean(com.linkedin.thirdeye.datalayer.pojo.IngraphMetricConfigBean) ArrayList(java.util.ArrayList) IngraphMetricConfigDTO(com.linkedin.thirdeye.datalayer.dto.IngraphMetricConfigDTO) 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