aokolnychyi commented on a change in pull request #2585:
URL: https://github.com/apache/iceberg/pull/2585#discussion_r631944303



##########
File path: core/src/main/java/org/apache/iceberg/actions/BinPackStrategy.java
##########
@@ -0,0 +1,183 @@
+/*
+ * 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 java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.iceberg.FileScanTask;
+import org.apache.iceberg.TableProperties;
+import org.apache.iceberg.actions.RewriteDataFiles.Strategy;
+import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
+import org.apache.iceberg.relocated.com.google.common.collect.FluentIterable;
+import org.apache.iceberg.relocated.com.google.common.collect.ImmutableSet;
+import org.apache.iceberg.util.BinPacking;
+import org.apache.iceberg.util.BinPacking.ListPacker;
+import org.apache.iceberg.util.PropertyUtil;
+
+/**
+ * A rewrite strategy for data files which determines which files to rewrite
+ * based on their size. If files are either smaller than the 
min-file-size-bytes threshold or
+ * larger than the max-file-size-bytes threshold, they are considered targets 
for being rewritten.
+ * <p>
+ * Once filtered files are grouped based on a {@link BinPacking} into groups 
defined
+ * by max group size. Groups will be considered for rewriting if they contain 
more files
+ * than min-input-files and would produce more files than min-output-files.
+ */
+abstract class BinPackStrategy implements RewriteStrategy {
+
+  /**
+   * Minimum number of files that need to be in a file group to be considered
+   * for rewriting. This is considered in conjunction with 
min-num-output-files, both

Review comment:
       nit: I think the doc wasn't updated. You could refer to it as `{@link 
#MIN_OUTPUT_FILES}` to make sure we catch all changes. 




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

Reply via email to