private JobStatus checkJobStatus(){
        boolean failure = false;
        boolean pending = false;
        if(status != JobStatus.PENDING){
            return status;
        }
        for(Task task : getMapperTasks()){
            if(task.getStatus() == TaskStatus.PENDING){
                pending = true;
            }
            if(task.getStatus() == TaskStatus.FAILED){
                failure = true;
                break;
            }
        }

        for(Task task : getReducerTasks()){
            if(task.getStatus() == TaskStatus.PENDING){
                pending = true;
            }
            if(task.getStatus() == TaskStatus.FAILED){
                failure = true;
                break;
            }
        }

        if(failure){
            setJobStatus(JobStatus.FAILED);
            return status;
        }
        if(pending){
            setJobStatus(JobStatus.PENDING);
            return status;
        }
        setJobStatus(JobStatus.SUCCEED);
        return status;
    }