[KYLIN-6087] Support built-in auto scheduled segment build with model-level config and scheduler#2347
[KYLIN-6087] Support built-in auto scheduled segment build with model-level config and scheduler#2347Mrhs121 wants to merge 3 commits into
Conversation
…el config and scheduler
…el config and scheduler
|
retest this please |
|
@jlfsdtc PTAL, Thanks |
|
Please add "dev design" and create an Apache issue at the same time. @Mrhs121 |
| } | ||
| val parts = key.split("/", 2); | ||
| if (parts.length != 2) { | ||
| return; |
There was a problem hiding this comment.
add error log, identify the abnormal key
| @Getter | ||
| private final AtomicInteger schedulerModelCount = new AtomicInteger(0); | ||
|
|
||
| @Scheduled(cron = "*/30 * * * * ?") |
There was a problem hiding this comment.
Why is it necessary to schedule this operation every 30 minutes? or this crontab expression should be configurable.
| val projectName = project.getName(); | ||
| val modelManager = NDataModelManager.getInstance(KylinConfig.readSystemKylinConfig(), projectName); | ||
| for (NDataModel model : modelManager.listAllModels()) { | ||
| val segmentConfig = model.getSegmentConfig(); |
There was a problem hiding this comment.
skip the offline model or broken model?
|
|
||
| private void startCron(String key, String cron) { | ||
| stopCron(key); | ||
| checkSchedulerThreadPoolSize(); |
There was a problem hiding this comment.
check every time of startCron or every time of schedule?
| if (autoSegmentBuild == null || !autoSegmentBuild.isEnabled()) { | ||
| return; | ||
| } | ||
| if (model.isStreaming() || model.isMultiPartitionModel() |
There was a problem hiding this comment.
model‘s status has been checked when walking through the model list in function reconcile,combine these into one.
| JobTypeEnum[] buildJobTypes = JobTypeEnum.getJobTypeByCategory(JobTypeEnum.Category.BUILD) | ||
| .toArray(new JobTypeEnum[0]); | ||
| List<AbstractExecutable> jobs = executableManager.listExecByModelAndStatus(modelId, | ||
| ExecutableState::isProgressing, buildJobTypes); |
There was a problem hiding this comment.
hasRunningBuildJob of the same segment or any segment?
No description provided.