aokolnychyi commented on a change in pull request #2287:
URL: https://github.com/apache/iceberg/pull/2287#discussion_r586927107
##########
File path:
spark/src/main/java/org/apache/iceberg/actions/ExpireSnapshotsAction.java
##########
@@ -210,7 +210,8 @@ public ExpireSnapshotsAction deleteWith(Consumer<String>
newDeleteFunc) {
}
@Override
- public ExpireSnapshotsActionResult execute() {
+ public ExpireSnapshotsActionResult doExecute() {
+ spark.sparkContext().setJobGroup("EXPIRE", "EXPIRE-SNAPSHOTS", false);
Review comment:
I'd probably add the following method to `BaseSparkAction` and make
implementations call as needed:
```
protected <T> T withJobGroupInfo(JobGroupInfo info, Runnable action) {
JobGroupInfo previousInfo = JobGroupUtils.getJobGroupInfo(sparkContext);
try {
JobGroupUtils.setJobGroupInfo(sparkContext, info);
return action.run();
} finally {
JobGroupUtils.setJobGroupInfo(sparkContext, previousInfo);
}
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]