amogh-jahagirdar commented on code in PR #10784:
URL: https://github.com/apache/iceberg/pull/10784#discussion_r1691918624


##########
api/src/main/java/org/apache/iceberg/actions/RepairManifests.java:
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iceberg.actions;
+
+import org.apache.iceberg.ManifestFile;
+
+/**
+ * An action that will repair manifests. Implementations should produce a new 
set of manifests where
+ * duplicate entries are removed and entries which refer to files which no 
longer exist are removed.
+ */
+public interface RepairManifests extends SnapshotUpdate<RepairManifests, 
RepairManifests.Result> {
+
+  /**
+   * Determine the rewritten and added manifests without actually committing 
the operation to the
+   * table
+   *
+   * @return this for method chaining
+   */
+  RepairManifests dryRun();
+
+  interface Result {
+    /** Returns rewritten manifests. */
+    Iterable<ManifestFile> rewrittenManifests();
+
+    /** Returns added manifests. */
+    Iterable<ManifestFile> addedManifests();
+
+    /** Returns the number of duplicate files removed */
+    long duplicateFilesRemoved();

Review Comment:
   Would it be more useful if this was an Iterable<String> of the actual 
duplicate files? same with the missing files below?
   
   TBH, it didn't seem useful to me because someone who is running repair 
probably wants to know if the table was corrected and to which extent was it 
corrected, rather than the individual files....but lmk what you think 
@szehon-ho @RussellSpitzer @danielcweeks 



-- 
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]

Reply via email to