Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,15 @@ public void cancel(CancelCloudWarmUpStmt stmt) throws DdlException {
}

public void cancel(long jobId) throws DdlException {
cancel(jobId, "user cancel");
}

public void cancel(long jobId, String msg) throws DdlException {
CloudWarmUpJob job = cloudWarmUpJobs.get(jobId);
if (job == null) {
throw new DdlException("job id: " + jobId + " does not exist.");
}
if (!job.cancel("user cancel", true)) {
if (!job.cancel(msg, true)) {
throw new DdlException("job can not be cancelled. State: " + job.getJobState());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private void cancelCacheJobs(ComputeGroup vcgInFe, List<String> jobIds) {
try {
if (Env.getCurrentEnv().isMaster()) {
// cancel old jobId, will write editlog, so just master can do
cacheHotspotManager.cancel(Long.parseLong(jobId));
cacheHotspotManager.cancel(Long.parseLong(jobId), "vcg cancel");
LOG.info("virtual compute group {}, cancel jobId {}", vcgInFe.getName(), jobId);
}
} catch (DdlException e) {
Expand Down
Loading