package com.lanyuanxiaoyao.service.yarn.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnApplication;
import org.eclipse.collections.api.list.ImmutableList;

/**
 * Job
 *
 * @author lanyuanxiaoyao
 * @date 2023-04-23
 */
public interface JobService {
    ImmutableList<YarnApplication> list(String cluster) throws JsonProcessingException;

    ImmutableList<YarnApplication> listRunning(String cluster) throws JsonProcessingException;

    ImmutableList<YarnApplication> listNotRunning(String cluster) throws JsonProcessingException;

    ImmutableList<YarnApplication> listEquals(String cluster, String name) throws JsonProcessingException;

    ImmutableList<YarnApplication> listRunningEquals(String cluster, String name) throws JsonProcessingException;

    ImmutableList<YarnApplication> listNotRunningEquals(String cluster, String name) throws JsonProcessingException;

    ImmutableList<YarnApplication> listLike(String cluster, String text) throws JsonProcessingException;

    ImmutableList<YarnApplication> listRunningLike(String cluster, String text) throws JsonProcessingException;

    ImmutableList<YarnApplication> listNotRunningLike(String cluster, String text) throws JsonProcessingException;

    YarnApplication detail(String cluster, String applicationId) throws Exception;
}
