Skip to content

[KYLIN-6087] Support built-in auto scheduled segment build with model-level config and scheduler#2347

Open
Mrhs121 wants to merge 3 commits into
apache:kylin5from
Mrhs121:scs
Open

[KYLIN-6087] Support built-in auto scheduled segment build with model-level config and scheduler#2347
Mrhs121 wants to merge 3 commits into
apache:kylin5from
Mrhs121:scs

Conversation

@Mrhs121

@Mrhs121 Mrhs121 commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Mrhs121

Mrhs121 commented Feb 10, 2026

Copy link
Copy Markdown
Contributor Author

retest this please

@Mrhs121

Mrhs121 commented Feb 10, 2026

Copy link
Copy Markdown
Contributor Author

@jlfsdtc PTAL, Thanks

@jlfsdtc

jlfsdtc commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Please add "dev design" and create an Apache issue at the same time. @Mrhs121

@Mrhs121 Mrhs121 changed the title Support built-in auto scheduled segment build with model-level config and scheduler [KYLIN-6087] Support built-in auto scheduled segment build with model-level config and scheduler Feb 26, 2026
}
val parts = key.split("/", 2);
if (parts.length != 2) {
return;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add error log, identify the abnormal key

@Getter
private final AtomicInteger schedulerModelCount = new AtomicInteger(0);

@Scheduled(cron = "*/30 * * * * ?")

@fishcus fishcus Jul 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip the offline model or broken model?


private void startCron(String key, String cron) {
stopCron(key);
checkSchedulerThreadPoolSize();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check every time of startCron or every time of schedule?

if (autoSegmentBuild == null || !autoSegmentBuild.isEnabled()) {
return;
}
if (model.isStreaming() || model.isMultiPartitionModel()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasRunningBuildJob of the same segment or any segment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants