RussellSpitzer commented on code in PR #18477:
URL: https://github.com/apache/iceberg/pull/18477#discussion_r4515352408
##########
spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/actions/ExpireSnapshotsSparkAction.java:
##########
@@ -82,8 +85,12 @@ public class ExpireSnapshotsSparkAction extends
BaseSparkAction<ExpireSnapshotsS
private Dataset<FileInfo> expiredFileDS = null;
private Boolean cleanExpiredMetadata = null;
+ private final Set<String> missingManifestListLocations =
Sets.newConcurrentHashSet();
+ private final SetAccumulator<String> missingManifests = new
SetAccumulator<>();
+
ExpireSnapshotsSparkAction(SparkSession spark, Table table) {
super(spark);
+ spark.sparkContext().register(missingManifests,
"expire-snapshots-missing-manifests");
Review Comment:
So in general, I dislike accumulators because I think they have very tricky
behavior and here we are tying it to a potentially unbounded collection. Beyond
the driver memory, the Spark UI and event log will keep a "toString" version of
the accumulator all over the place. You can avoid this by not naming the
accumulator but it's still another little trick.
My end thought here would be, how valuable is it for us to really keep this
list of names around? Is the logging sufficient as is?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]