RussellSpitzer commented on code in PR #7361:
URL: https://github.com/apache/iceberg/pull/7361#discussion_r1176962658
##########
core/src/main/java/org/apache/iceberg/actions/RewriteDataFilesCommitManager.java:
##########
@@ -199,12 +201,28 @@ public void offer(RewriteFileGroup group) {
commitReadyCommitGroups();
}
+ /**
+ * Places a failed file group in the queue to be asynchronously added to
{@link
+ * #committerService} when the service has been closed.
+ *
+ * @param group file group had failed
+ */
+ public void failedRewrite(RewriteFileGroup group) {
+ LOG.debug("Offered to failed service: {}", group);
+ Preconditions.checkState(
+ running.get(), "Cannot add rewrites to a service which has already
been closed");
+ failedRewrites.add(group);
+ }
+
/** Returns all File groups which have been committed */
public List<RewriteFileGroup> results() {
+ List<RewriteFileGroup> results = Lists.newArrayList();
Preconditions.checkState(
committerService.isShutdown(),
"Cannot get results from a service which has not been closed");
- return committedRewrites;
+ results.addAll(committedRewrites);
+ results.addAll(failedRewrites);
Review Comment:
Not sure we should mix these in the same list? Maybe we should split this
into just two separate lists (or methods)?
Results() ++
Failures() ?
--
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]