org.springframework.data.hadoop.mapreduce
Enum JobUtils.JobStatus

java.lang.Object
  extended by java.lang.Enum<JobUtils.JobStatus>
      extended by org.springframework.data.hadoop.mapreduce.JobUtils.JobStatus
All Implemented Interfaces:
Serializable, Comparable<JobUtils.JobStatus>
Enclosing class:
JobUtils

public static enum JobUtils.JobStatus
extends Enum<JobUtils.JobStatus>

Status of a job. The enum tries to reuse as much as possible the internal Hadoop terminology.

Author:
Costin Leau

Enum Constant Summary
DEFINED
          The job is has been/is being defined or configured.
FAILED
          The execution has failed.
KILLED
          The execution was cancelled or killed.
PREPARING
          The job has been submited to the tracker and its execution is being prepared.
RUNNING
          The job is actually running.
SUCCEEDED
          The execution has completed successfully.
UNKNOWN
          The status cannot be determined - either because the job might be invalid or maybe because of a communication failure.
 
Method Summary
static JobUtils.JobStatus fromJobState(Job.JobState jobState)
           
static JobUtils.JobStatus fromRunState(int state)
           
 boolean isFinished()
           
 boolean isRunning()
           
 boolean isStarted()
           
static JobUtils.JobStatus valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JobUtils.JobStatus[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final JobUtils.JobStatus UNKNOWN
The status cannot be determined - either because the job might be invalid or maybe because of a communication failure.


DEFINED

public static final JobUtils.JobStatus DEFINED
The job is has been/is being defined or configured. It has not been submitted to the job tracker.


PREPARING

public static final JobUtils.JobStatus PREPARING
The job has been submited to the tracker and its execution is being prepared.


RUNNING

public static final JobUtils.JobStatus RUNNING
The job is actually running.


SUCCEEDED

public static final JobUtils.JobStatus SUCCEEDED
The execution has completed successfully.


FAILED

public static final JobUtils.JobStatus FAILED
The execution has failed.


KILLED

public static final JobUtils.JobStatus KILLED
The execution was cancelled or killed.

Method Detail

values

public static JobUtils.JobStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (JobUtils.JobStatus c : JobUtils.JobStatus.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static JobUtils.JobStatus valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromRunState

public static JobUtils.JobStatus fromRunState(int state)

fromJobState

public static JobUtils.JobStatus fromJobState(Job.JobState jobState)

isRunning

public boolean isRunning()

isFinished

public boolean isFinished()

isStarted

public boolean isStarted()