Example usage for org.apache.hadoop.mapreduce Job isRetired

List of usage examples for org.apache.hadoop.mapreduce Job isRetired

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce Job isRetired.

Prototype

public boolean isRetired() throws IOException, InterruptedException 

Source Link

Usage

From source file:org.apache.nutch.mapreduce.NutchUtil.java

License:Apache License

public static Map<String, Object> getJobState(Job job, String... groups) {
    Map<String, Object> jobState = Maps.newHashMap();
    if (job == null) {
        return jobState;
    }/*w  w  w. j a v  a  2  s  . co  m*/

    try {
        if (job.getStatus() == null || job.isRetired()) {
            return jobState;
        }
    } catch (IOException | InterruptedException e) {
        return jobState;
    }

    jobState.put("jobName", job.getJobName());
    jobState.put("jobID", job.getJobID());

    jobState.put(Nutch.STAT_COUNTERS, getJobCounters(job, groups));

    return jobState;
}