Package com.dnanexus

Class DXJob.Describe

  • Enclosing class:
    DXJob

    public static final class DXJob.Describe
    extends DXExecution.Describe
    Contains metadata about a job. All accessors reflect the state of the job at the time that this object was created.
    • Method Detail

      • getApplet

        public DXApplet getApplet()
        Returns the applet of the job if it is running an applet, or null otherwise.
        Returns:
        applet or null
      • getFailureMessage

        public String getFailureMessage()
        Returns a detailed message describing why the job failed, or null if the job is not in a failing or failed state.
        Returns:
        detailed failure message, or null
      • getFailureReason

        public String getFailureReason()
        Returns a short String describing why the job failed, or null if the job is not in a failing or failed state.
        Returns:
        short failure reason, or null
      • getFunction

        public String getFunction()
        Returns the name of the function (entry point) that the job is running.
        Returns:
        function name
      • getOriginJob

        public DXJob getOriginJob()
        Returns the closest ancestor job whose parentJob is null. This is the nearest job that was run by a user directly or was run as a stage in an analysis.
        Returns:
        origin job
      • getOutput

        public <T> T getOutput​(Class<T> outputClass)
        Returns the output of the job, deserialized to the specified class, or null if no output hash is available. Note that this field is not guaranteed to be complete until the job has finished.

        A partial output hash is available as soon as the job reaches state "waiting_on_output". At this time the output may contain unresolved job-based object references. These references will be resolved by the time the job reaches state "done".

        Overrides:
        getOutput in class DXExecution.Describe
        Parameters:
        outputClass - class to deserialize to
        Returns:
        output object or null
      • getProjectCache

        public DXContainer getProjectCache()
        Returns the project cache container for the job if it is running an app, or null otherwise.
        Returns:
        project cache container or null
      • getResources

        public DXContainer getResources()
        Returns the resources container for the job if it is running an app, or null otherwise.
        Returns:
        resources container or null
      • getStartDate

        public Date getStartDate()
        Returns the date that the job started running, or null if the job has not started running yet.
        Returns:
        start date or null
      • getState

        public JobState getState()
        Returns the state of the job.
        Returns:
        job state
      • getStateTransitions

        public List<DXJob.StateTransition> getStateTransitions()
        Returns a list of the state transitions for the job, showing each state that the job reached and at what time. Every job implicitly starts in state "idle" (which does not appear in the state transition list).
        Returns:
        List of state transitions
      • getStopDate

        public Date getStopDate()
        Returns the date that the job stopped running, or null if the job has not stopped running yet.
        Returns:
        stop date or null
      • getFailureCounts

        public Map<String,​Integer> getFailureCounts()
        A mapping from failure types to the number of times that type occurred and caused the job to be restarted before the job try being described. Failure types include categories such as AppError.
        Returns:
        map of failure reason to count, or null
      • getTry

        public Integer getTry()
        Returns the try for this job, with 0 corresponding to the first try, 1 corresponding to the second try for restarted jobs and so on. null is returned for jobs belonging to root executions launched before July 12, 2023 00:13 UTC and information for the latest job try is returned.
        Returns:
        try number, or null
      • isFree

        public boolean isFree()
        Returns whether the job will be charged to the billed entity (billTo).

        Usually the job will be free if the job has failed for reasons (see getFailureReason()) that are generally indicative of some system error rather than of user error.

        Returns:
        true if the job is free
        Throws:
        IllegalStateException - if the requesting user does not have permission to view the pricing model of the billed entity (billTo), or the price of the execution has not been finalized