org.apache.oozie.util
Class StatusUtils

java.lang.Object
  extended by org.apache.oozie.util.StatusUtils

public class StatusUtils
extends Object


Constructor Summary
StatusUtils()
           
 
Method Summary
static org.apache.oozie.client.Job.Status getStatus(CoordinatorJobBean coordJob)
          This Function transforms the statuses based on the name space of the coordinator App
static boolean getStatusForCoordActionInputCheck(CoordinatorJobBean coordJob)
          This function check if eligible to do action input check when running with backward support is true.
static org.apache.oozie.client.Job.Status getStatusForCoordRerun(CoordinatorJobBean coordJob, org.apache.oozie.client.Job.Status prevStatus)
          This function changes back the status for coordinator rerun if the job was SUCCEEDED or SUSPENDED when rerun with backward support is true.
static org.apache.oozie.client.Job.Status getStatusIfBackwardSupportTrue(org.apache.oozie.client.Job.Status currentJobStatus)
          Get the status of coordinator job for Oozie versions (3.2 and before) when RUNNINGWITHERROR, SUSPENDEDWITHERROR and PAUSEDWITHERROR are not supported
static boolean isV1CoordjobKillable(CoordinatorJobBean coordJob)
          If namespace 0.1 is used and backward support is true, SUCCEEDED coord job can be killed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusUtils

public StatusUtils()
Method Detail

getStatus

public static org.apache.oozie.client.Job.Status getStatus(CoordinatorJobBean coordJob)
This Function transforms the statuses based on the name space of the coordinator App

Parameters:
coordJob - This will be the coordinator job bean for which we need to get the status based on version
Returns:
Job.Status This would be the new status based on the app version.

getStatusForCoordRerun

public static org.apache.oozie.client.Job.Status getStatusForCoordRerun(CoordinatorJobBean coordJob,
                                                                        org.apache.oozie.client.Job.Status prevStatus)
This function changes back the status for coordinator rerun if the job was SUCCEEDED or SUSPENDED when rerun with backward support is true.

Parameters:
coordJob - This will be the coordinator job bean for which we need to get the status based on version
prevStatus - coordinator job previous status
Returns:
Job.Status This would be the new status based on the app version.

getStatusForCoordActionInputCheck

public static boolean getStatusForCoordActionInputCheck(CoordinatorJobBean coordJob)
This function check if eligible to do action input check when running with backward support is true.

Parameters:
coordJob - This will be the coordinator job bean for which we need to get the status based on version
Returns:
true if eligible to do action input check

isV1CoordjobKillable

public static boolean isV1CoordjobKillable(CoordinatorJobBean coordJob)
If namespace 0.1 is used and backward support is true, SUCCEEDED coord job can be killed

Parameters:
coordJob - the coordinator job
Returns:
true if namespace 0.1 is used and backward support is true, SUCCEEDED coord job can be killed

getStatusIfBackwardSupportTrue

public static org.apache.oozie.client.Job.Status getStatusIfBackwardSupportTrue(org.apache.oozie.client.Job.Status currentJobStatus)
Get the status of coordinator job for Oozie versions (3.2 and before) when RUNNINGWITHERROR, SUSPENDEDWITHERROR and PAUSEDWITHERROR are not supported

Parameters:
coordJob -
Returns:


Copyright © 2013 Apache Software Foundation. All Rights Reserved.