Search in sources :

Example 1 with JobFinalStatus

use of io.hops.hopsworks.persistence.entity.jobs.configuration.history.JobFinalStatus in project hopsworks by logicalclocks.

the class ExecutionFacade method setFilterQuery.

private void setFilterQuery(AbstractFacade.FilterBy filterBy, Query q) {
    switch(Filters.valueOf(filterBy.getValue())) {
        case STATE:
        case STATE_NEQ:
            Set<JobState> jobTypes = new HashSet<>(getJobStates(filterBy.getField(), filterBy.getParam()));
            q.setParameter(filterBy.getField(), jobTypes);
            break;
        case SUBMISSIONTIME_GT:
        case SUBMISSIONTIME_LT:
        case SUBMISSIONTIME:
            Date date = getDate(filterBy.getField(), filterBy.getParam());
            q.setParameter(filterBy.getField(), date);
            break;
        case FINALSTATUS:
        case FINALSTATUS_NEQ:
            Set<JobFinalStatus> jobFinalStatuses = new HashSet<>(getJobFinalStatus(filterBy.getField(), filterBy.getParam()));
            q.setParameter(filterBy.getField(), jobFinalStatuses);
            break;
        default:
            break;
    }
}
Also used : JobFinalStatus(io.hops.hopsworks.persistence.entity.jobs.configuration.history.JobFinalStatus) JobState(io.hops.hopsworks.persistence.entity.jobs.configuration.history.JobState) Date(java.util.Date) HashSet(java.util.HashSet)

Aggregations

JobFinalStatus (io.hops.hopsworks.persistence.entity.jobs.configuration.history.JobFinalStatus)1 JobState (io.hops.hopsworks.persistence.entity.jobs.configuration.history.JobState)1 Date (java.util.Date)1 HashSet (java.util.HashSet)1