Package de.dlr.proseo.planner.util
Klasse JobStepUtil
java.lang.Object
de.dlr.proseo.planner.util.JobStepUtil
Handle job steps
- Autor:
- Ernst Melchinger
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibung(Package privat) ProductionPlannerConfiguration
Planner configuration(Package privat) org.springframework.boot.web.client.RestTemplateBuilder
REST template builder(Package privat) ProductionPlannerSecurityConfig
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungCancel job stepvoid
Check whether the product of job step existscheckFinish
(JobStep js) Check job step whether job step has been finishedvoid
Check all unsatisfied queries of all job steps on all facilities whether they can be started.void
checkForJobStepsToRun
(KubeConfig kc, long pcId, Boolean onlyRun, Boolean onlyWaiting) If onlyRun is false, check unsatisfied queries of product class on processing facility (defined in Kube config).void
checkJobStepQueries
(JobStep js, Boolean force) Check the queries of a job step which job is released or started.checkJobStepToRun
(KubeConfig kc, long jsId) Check unsatisfied queries of job step on processing facility (defined in Kube config).void
checkJobToRun
(KubeConfig kc, long jobId) Check unsatisfied queries of job steps in job on processing facility (defined in Kube config).void
checkOrderToRun
(KubeConfig kc, long orderId) Check unsatisfied queries of job steps in processing order on processing facility (defined in Kube config).checkProducts
(List<Product> list, ProcessingFacility pf) Check whether the products of list exists and are already generatedClose job stepvoid
collectProducts
(Product p, List<Product> list) Recursively collect products of a product tree into listDelete job stepdeleteForced
(JobStep js) Delete also not finished job stepDelete satisfied product queries of job stepfindOrderedByJobStepStateAndMission
(JobStep.JobStepState state, String mission, int limit) Find job steps of specific job step state.Resume job stepRetry job stepvoid
searchForJobStepsToRun
(long pfId, long pcId, boolean onlyWaiting) Search for not satisfied product queries referencing product class on processing facility and check which are now satisfied.startJobStep
(JobStep js) Start job step on Kubernetes clusterSuspend job step, kill it if force is true otherwise wait until finish.
-
Felddetails
-
config
Planner configuration -
securityConfig
-
rtb
@Autowired org.springframework.boot.web.client.RestTemplateBuilder rtbREST template builder
-
-
Konstruktordetails
-
JobStepUtil
public JobStepUtil()
-
-
Methodendetails
-
findOrderedByJobStepStateAndMission
public List<JobStep> findOrderedByJobStepStateAndMission(JobStep.JobStepState state, String mission, int limit) Find job steps of specific job step state. The result is ordered by processingCompletionTime descending and returns the first 'limit' entries.- Parameter:
state
- The job step statemission
- The mission codelimit
- The length of result entry list- Gibt zurück:
- The found job steps
-
searchForJobStepsToRun
public void searchForJobStepsToRun(long pfId, long pcId, boolean onlyWaiting) Search for not satisfied product queries referencing product class on processing facility and check which are now satisfied. Change state of job step to READY if all queries are now satisfied.- Parameter:
processingFacility
-pc
- Product class
-
suspend
@Transactional(isolation=REPEATABLE_READ) public PlannerResultMessage suspend(JobStep js, Boolean force) Suspend job step, kill it if force is true otherwise wait until finish.- Parameter:
js
- Job stepforce
- Force- Gibt zurück:
- Result message
-
cancel
Cancel job step- Parameter:
js
- Job step- Gibt zurück:
- Result message
-
close
Close job step- Parameter:
js
- Job step- Gibt zurück:
- Result message
-
retry
Retry job step- Parameter:
js
- Job step- Gibt zurück:
- Result message
-
checkFinish
Check job step whether job step has been finished- Parameter:
js
- Job step- Gibt zurück:
- true if finished
-
delete
Delete job step- Parameter:
js
- Job step- Gibt zurück:
- true if deleted
-
deleteSatisfiedProductQueries
Delete satisfied product queries of job step- Parameter:
js
- Job step- Gibt zurück:
- true if deleted
-
deleteForced
Delete also not finished job step- Parameter:
js
- Job step- Gibt zurück:
- true if deleted
-
resume
Resume job step- Parameter:
js
- Job step- Gibt zurück:
- Result message
-
startJobStep
Start job step on Kubernetes cluster- Parameter:
js
- Job step- Gibt zurück:
- Result message
-
checkJobStepQueries
Check the queries of a job step which job is released or started. Check all if force is true- Parameter:
force
-id
- Job step id
-
checkForJobStepsToRun
public void checkForJobStepsToRun()Check all unsatisfied queries of all job steps on all facilities whether they can be started. -
checkForJobStepsToRun
If onlyRun is false, check unsatisfied queries of product class on processing facility (defined in Kube config). Start ready job steps on facility.- Parameter:
kc
- KubeConfigonlyRun
-pc
- ProductClass
-
checkJobStepToRun
Check unsatisfied queries of job step on processing facility (defined in Kube config). Start ready job steps on facility. Method is synchronized to avoid different threads (simultaneous event-triggered dispatching) to interfere with each other.- Parameter:
kc
- KubeConfigjsId
- JobStep id
-
checkJobToRun
Check unsatisfied queries of job steps in job on processing facility (defined in Kube config). Start ready job steps on facility. Method is synchronized to avoid different threads (simultaneous event-triggered dispatching) to interfere with each other.- Parameter:
kc
- KubeConfigjob
- Job- Löst aus:
InterruptedException
-
checkOrderToRun
Check unsatisfied queries of job steps in processing order on processing facility (defined in Kube config). Start ready job steps on facility. Method is synchronized to avoid different threads (simultaneous event-triggered dispatching) to interfere with each other.- Parameter:
kc
- KubeConfigorder
- ProcessingOrder
-
checkCreatedProducts
Check whether the product of job step exists- Parameter:
js
- job step
-
collectProducts
@Transactional(isolation=REPEATABLE_READ) public void collectProducts(Product p, List<Product> list) Recursively collect products of a product tree into list- Parameter:
p
- Root productlist
- Product list
-
checkProducts
@Transactional(isolation=REPEATABLE_READ) public Boolean checkProducts(List<Product> list, ProcessingFacility pf) Check whether the products of list exists and are already generated- Parameter:
list
- Product listpf
- ProcessingFacility- Gibt zurück:
- true if all products are generated
-