use of com.dtstack.taier.scheduler.service.EngineJobCacheService in project Taier by DTStack.
the class ShardCache method getShardManager.
private ShardManager getShardManager(String jobId) {
EngineJobCacheService engineJobCacheService = applicationContext.getBean(EngineJobCacheService.class);
ScheduleEngineJobCache engineJobCache = engineJobCacheService.getByJobId(jobId);
if (engineJobCache == null) {
return null;
}
return jobResourceShardManager.computeIfAbsent(engineJobCache.getJobResource(), jr -> {
ShardManager shardManager = new ShardManager(engineJobCache.getJobResource());
JobStatusDealer jobStatusDealer = new JobStatusDealer();
jobStatusDealer.setJobResource(engineJobCache.getJobResource());
jobStatusDealer.setShardManager(shardManager);
jobStatusDealer.setShardCache(this);
jobStatusDealer.setApplicationContext(applicationContext);
jobStatusDealer.start();
return shardManager;
});
}
Aggregations