Enum JobStatus

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<JobStatus>

    public enum JobStatus
    extends java.lang.Enum<JobStatus>
    Represents current status of the job from the perspective of the job coordinator.
    Since:
    Jet 3.0
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      COMPLETED
      The job has completed successfully.
      COMPLETING
      The job is currently being completed.
      FAILED
      The job has failed with an exception.
      NOT_RUNNING
      The job is submitted but hasn't started yet.
      RUNNING
      The job is currently running.
      STARTING
      The job is in the initialization phase on a new coordinator.
      SUSPENDED
      The job is suspended and it can be manually resumed.
      SUSPENDED_EXPORTING_SNAPSHOT
      The job is suspended and is exporting the snapshot.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static JobStatus getById​(int id)  
      int getId()  
      boolean isTerminal()
      Returns true if this state is terminal - a job in this state will never have any other state and will never execute again.
      static JobStatus valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static 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

      • NOT_RUNNING

        public static final JobStatus NOT_RUNNING
        The job is submitted but hasn't started yet. A job also enters this state when its execution was interrupted (e.g., due to a cluster member failing), before it is started again.
      • STARTING

        public static final JobStatus STARTING
        The job is in the initialization phase on a new coordinator.
      • RUNNING

        public static final JobStatus RUNNING
        The job is currently running.
      • SUSPENDED

        public static final JobStatus SUSPENDED
        The job is suspended and it can be manually resumed.
      • SUSPENDED_EXPORTING_SNAPSHOT

        public static final JobStatus SUSPENDED_EXPORTING_SNAPSHOT
        The job is suspended and is exporting the snapshot. It cannot be resumed until the export is finished and status is SUSPENDED again.
      • COMPLETING

        public static final JobStatus COMPLETING
        The job is currently being completed.
      • FAILED

        public static final JobStatus FAILED
        The job has failed with an exception.
      • COMPLETED

        public static final JobStatus COMPLETED
        The job has completed successfully.
    • Method Detail

      • values

        public static 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 (JobStatus c : 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 JobStatus valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isTerminal

        public boolean isTerminal()
        Returns true if this state is terminal - a job in this state will never have any other state and will never execute again. It's COMPLETED or FAILED.
      • getById

        public static JobStatus getById​(int id)
      • getId

        public int getId()