Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HUDI-8596] Fix Hudi Spark SQL cancelling issue #12358

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -193,7 +193,7 @@ public Option<String> getProperty(EngineProperty key) {

@Override
public void setJobStatus(String activeModule, String activityDescription) {
javaSparkContext.setJobGroup(activeModule, activityDescription);
javaSparkContext.setJobDescription(String.format("%s:%s", activeModule, activityDescription));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,16 @@ void testAddRemoveCachedDataIds() {
assertEquals(Arrays.asList(1, 2, 3), context.removeCachedDataIds(HoodieDataCacheKey.of(basePath, instantTime)));
assertTrue(context.getCachedDataIds(HoodieDataCacheKey.of(basePath, instantTime)).isEmpty());
}

@Test
void testSetJobStatus() {
// Test data
String activeModule = "TestModule";
String activityDescription = "Running test operation";
String expectedJobDescription = String.format("%s:%s", activeModule, activityDescription);

// Set the job status
context.setJobStatus(activeModule, activityDescription);
assertEquals(expectedJobDescription, context.getJavaSparkContext().getLocalProperty("spark.job.description"));
}
}
Loading