Record Class OrphanedMasterJob

java.lang.Object
java.lang.Record
io.github.jchejarla.springbatch.clustering.mgmt.OrphanedMasterJob
Record Components:
jobExecutionId - the Spring Batch job execution id of the stranded job
masterNodeId - the id of the master node that was lost
masterStepExecutionId - the manager step execution id that coordinated the partitions
masterStepName - the manager step name

public record OrphanedMasterJob(long jobExecutionId, String masterNodeId, long masterStepExecutionId, String masterStepName) extends Record
A job whose master node has left the cluster while the job was still running.

Produced by the recovery scan when a BATCH_JOB_COORDINATION row is still marked STARTED but its master node is no longer present in BATCH_NODES. Such a job can no longer make progress on its own (the node that was monitoring and aggregating it is gone), so a surviving node reaps it.

Author:
Janardhan Chejarla
  • Constructor Details

    • OrphanedMasterJob

      public OrphanedMasterJob(long jobExecutionId, String masterNodeId, long masterStepExecutionId, String masterStepName)
      Creates an instance of a OrphanedMasterJob record class.
      Parameters:
      jobExecutionId - the value for the jobExecutionId record component
      masterNodeId - the value for the masterNodeId record component
      masterStepExecutionId - the value for the masterStepExecutionId record component
      masterStepName - the value for the masterStepName record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • jobExecutionId

      public long jobExecutionId()
      Returns the value of the jobExecutionId record component.
      Returns:
      the value of the jobExecutionId record component
    • masterNodeId

      public String masterNodeId()
      Returns the value of the masterNodeId record component.
      Returns:
      the value of the masterNodeId record component
    • masterStepExecutionId

      public long masterStepExecutionId()
      Returns the value of the masterStepExecutionId record component.
      Returns:
      the value of the masterStepExecutionId record component
    • masterStepName

      public String masterStepName()
      Returns the value of the masterStepName record component.
      Returns:
      the value of the masterStepName record component