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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations