Search in sources :

Example 1 with AutotuneConfigBean

use of com.linkedin.thirdeye.datalayer.pojo.AutotuneConfigBean 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 2 with AutotuneConfigBean

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

the class AutotuneConfigManagerImpl method beansToDTOs.

private List<AutotuneConfigDTO> beansToDTOs(List<AutotuneConfigBean> list) {
    List<AutotuneConfigDTO> result = new ArrayList<>();
    for (AutotuneConfigBean bean : list) {
        AutotuneConfigDTO dto = MODEL_MAPPER.map(bean, AutotuneConfigDTO.class);
        result.add(dto);
    }
    return result;
}
Also used : ArrayList(java.util.ArrayList) AutotuneConfigDTO(com.linkedin.thirdeye.datalayer.dto.AutotuneConfigDTO) AutotuneConfigBean(com.linkedin.thirdeye.datalayer.pojo.AutotuneConfigBean)

Example 3 with AutotuneConfigBean

use of com.linkedin.thirdeye.datalayer.pojo.AutotuneConfigBean 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 4 with AutotuneConfigBean

use of com.linkedin.thirdeye.datalayer.pojo.AutotuneConfigBean 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 5 with AutotuneConfigBean

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

the class AutotuneConfigManagerImpl method findAllByFunctionIdAutotuneAndEvaluationMethod.

@Override
public List<AutotuneConfigDTO> findAllByFunctionIdAutotuneAndEvaluationMethod(long functionId, String autoTuneMethod, String performanceEvaluationMethod) {
    Predicate predicate = Predicate.AND(Predicate.EQ(FUNCTION_ID, functionId), Predicate.EQ(AUTOTUNE_METHOD, autoTuneMethod), Predicate.EQ(PERFORMANCE_EVALUATION_METHOD, performanceEvaluationMethod));
    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)

Aggregations

AutotuneConfigBean (com.linkedin.thirdeye.datalayer.pojo.AutotuneConfigBean)5 Predicate (com.linkedin.thirdeye.datalayer.util.Predicate)4 AutotuneConfigDTO (com.linkedin.thirdeye.datalayer.dto.AutotuneConfigDTO)1 ArrayList (java.util.ArrayList)1