Job-assign-delete-jiriaf

From epsciwiki
Jump to navigation Jump to search

Assigning Jobs to Nodes

  • For batch-type jobs, we assign the job to a node if the node’s alive time is greater than or equal to the requested job time.
  • For stream-type jobs, we can still assign the job to a node even if the node has less alive time compared to the requested time.

Job Completion and Termination

  • When the run time of a batch-type job reaches the requested time, we consider it finished and should terminate it.
  • For stream-type jobs, we calculate the run time by summing up the accumulated time of all replica pods. If this accumulated time is equal to or greater than the requested time, we terminate the jobs.

To-Do

1. Batch-Type Jobs Timer Setup:

  - Set up a timer for batch-type jobs that triggers job deletion by removing pods or deployments.
  - This can be achieved by adding batch commands in the bash job script.

2. Accumulated Time and Deletion Trigger:

  - Retrieve the accumulated time from the Kubernetes (k8s) API.
  - Use this information to trigger the deletion process manually for stream-type jobs.