This is an automated email from the ASF dual-hosted git repository.

mxm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 3557bee9dc Build, Flink: Enable error-prone `AlmostJavadoc` and fix 
`BucketPartitioner` javadoc (#18906)
3557bee9dc is described below

commit 3557bee9dc4d7014901f31dee4d1b9db3ca36286
Author: Yuya Ebihara <[email protected]>
AuthorDate: Fri Nov 20 19:38:20 2026 +0900

    Build, Flink: Enable error-prone `AlmostJavadoc` and fix 
`BucketPartitioner` javadoc (#18906)
---
 baseline.gradle                                    |  1 +
 .../iceberg/flink/sink/BucketPartitioner.java      | 36 ++++++++++++++--------
 .../iceberg/flink/sink/BucketPartitioner.java      | 36 ++++++++++++++--------
 .../iceberg/flink/sink/BucketPartitioner.java      | 36 ++++++++++++++--------
 4 files changed, 70 insertions(+), 39 deletions(-)

diff --git a/baseline.gradle b/baseline.gradle
index 6b180effbb..482e55a643 100644
--- a/baseline.gradle
+++ b/baseline.gradle
@@ -89,6 +89,7 @@ subprojects {
       options.errorprone.errorproneArgs.addAll (
           // error-prone is slow, don't run on tests/generated-src/generated
           '-XepExcludedPaths:.*/(test|integration|generated-src|generated)/.*',
+          '-Xep:AlmostJavadoc:ERROR',
           '-Xep:AnnotateFormatMethod:ERROR',
           '-Xep:BadComparable:ERROR',
           '-Xep:BadInstanceof:ERROR',
diff --git 
a/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
 
b/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
index 9c9a117906..85da53327c 100644
--- 
a/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
+++ 
b/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
@@ -51,8 +51,7 @@ class BucketPartitioner implements Partitioner<Integer> {
    * Determine the partition id based on the following criteria: If the number 
of writers <= the
    * number of buckets, an evenly distributed number of buckets will be 
assigned to each writer (one
    * writer -> many buckets). Conversely, if the number of writers > the 
number of buckets the logic
-   * is handled by the {@link #getPartitionWithMoreWritersThanBuckets
-   * getPartitionWritersGreaterThanBuckets} method.
+   * is handled by the {@link #getPartitionWithMoreWritersThanBuckets} method.
    *
    * @param bucketId the bucketId for each request
    * @param numPartitions the total number of partitions
@@ -72,18 +71,29 @@ class BucketPartitioner implements Partitioner<Integer> {
     }
   }
 
-  /*-
+  /**
    * If the number of writers > the number of buckets each partitioner will 
keep a state of multiple
-   * writers per bucket as evenly as possible, and will round-robin the 
requests across them, in this
-   * case each writer will target only one bucket at all times (many writers 
-> one bucket). Example:
-   * Configuration: numPartitions (writers) = 5, maxBuckets = 2
-   * Expected behavior:
-   * - Records for Bucket 0 will be "round robin" between Writers 0, 2 and 4
-   * - Records for Bucket 1 will always use Writer 1 and 3
-   * Notes:
-   * - maxNumWritersPerBucket determines when to reset the 
currentBucketWriterOffset to 0 for this bucketId
-   * - When numPartitions is not evenly divisible by maxBuckets, some buckets 
will have one more writer (extraWriter).
-   * In this example Bucket 0 has an "extra writer" to consider before 
resetting its offset to 0.
+   * writers per bucket as evenly as possible, and will round-robin the 
requests across them, in
+   * this case each writer will target only one bucket at all times (many 
writers -> one bucket).
+   *
+   * <p>Example: Configuration: numPartitions (writers) = 5, maxBuckets = 2
+   *
+   * <p>Expected behavior:
+   *
+   * <ul>
+   *   <li>Records for Bucket 0 will be "round robin" between Writers 0, 2 and 
4
+   *   <li>Records for Bucket 1 will always use Writer 1 and 3
+   * </ul>
+   *
+   * <p>Notes:
+   *
+   * <ul>
+   *   <li>maxNumWritersPerBucket determines when to reset the 
currentBucketWriterOffset to 0 for
+   *       this bucketId
+   *   <li>When numPartitions is not evenly divisible by maxBuckets, some 
buckets will have one more
+   *       writer (extraWriter). In this example Bucket 0 has an "extra 
writer" to consider before
+   *       resetting its offset to 0.
+   * </ul>
    *
    * @return the destination partition index (writer subtask id)
    */
diff --git 
a/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
 
b/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
index 9c9a117906..85da53327c 100644
--- 
a/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
+++ 
b/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
@@ -51,8 +51,7 @@ class BucketPartitioner implements Partitioner<Integer> {
    * Determine the partition id based on the following criteria: If the number 
of writers <= the
    * number of buckets, an evenly distributed number of buckets will be 
assigned to each writer (one
    * writer -> many buckets). Conversely, if the number of writers > the 
number of buckets the logic
-   * is handled by the {@link #getPartitionWithMoreWritersThanBuckets
-   * getPartitionWritersGreaterThanBuckets} method.
+   * is handled by the {@link #getPartitionWithMoreWritersThanBuckets} method.
    *
    * @param bucketId the bucketId for each request
    * @param numPartitions the total number of partitions
@@ -72,18 +71,29 @@ class BucketPartitioner implements Partitioner<Integer> {
     }
   }
 
-  /*-
+  /**
    * If the number of writers > the number of buckets each partitioner will 
keep a state of multiple
-   * writers per bucket as evenly as possible, and will round-robin the 
requests across them, in this
-   * case each writer will target only one bucket at all times (many writers 
-> one bucket). Example:
-   * Configuration: numPartitions (writers) = 5, maxBuckets = 2
-   * Expected behavior:
-   * - Records for Bucket 0 will be "round robin" between Writers 0, 2 and 4
-   * - Records for Bucket 1 will always use Writer 1 and 3
-   * Notes:
-   * - maxNumWritersPerBucket determines when to reset the 
currentBucketWriterOffset to 0 for this bucketId
-   * - When numPartitions is not evenly divisible by maxBuckets, some buckets 
will have one more writer (extraWriter).
-   * In this example Bucket 0 has an "extra writer" to consider before 
resetting its offset to 0.
+   * writers per bucket as evenly as possible, and will round-robin the 
requests across them, in
+   * this case each writer will target only one bucket at all times (many 
writers -> one bucket).
+   *
+   * <p>Example: Configuration: numPartitions (writers) = 5, maxBuckets = 2
+   *
+   * <p>Expected behavior:
+   *
+   * <ul>
+   *   <li>Records for Bucket 0 will be "round robin" between Writers 0, 2 and 
4
+   *   <li>Records for Bucket 1 will always use Writer 1 and 3
+   * </ul>
+   *
+   * <p>Notes:
+   *
+   * <ul>
+   *   <li>maxNumWritersPerBucket determines when to reset the 
currentBucketWriterOffset to 0 for
+   *       this bucketId
+   *   <li>When numPartitions is not evenly divisible by maxBuckets, some 
buckets will have one more
+   *       writer (extraWriter). In this example Bucket 0 has an "extra 
writer" to consider before
+   *       resetting its offset to 0.
+   * </ul>
    *
    * @return the destination partition index (writer subtask id)
    */
diff --git 
a/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
 
b/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
index 9c9a117906..85da53327c 100644
--- 
a/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
+++ 
b/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/BucketPartitioner.java
@@ -51,8 +51,7 @@ class BucketPartitioner implements Partitioner<Integer> {
    * Determine the partition id based on the following criteria: If the number 
of writers <= the
    * number of buckets, an evenly distributed number of buckets will be 
assigned to each writer (one
    * writer -> many buckets). Conversely, if the number of writers > the 
number of buckets the logic
-   * is handled by the {@link #getPartitionWithMoreWritersThanBuckets
-   * getPartitionWritersGreaterThanBuckets} method.
+   * is handled by the {@link #getPartitionWithMoreWritersThanBuckets} method.
    *
    * @param bucketId the bucketId for each request
    * @param numPartitions the total number of partitions
@@ -72,18 +71,29 @@ class BucketPartitioner implements Partitioner<Integer> {
     }
   }
 
-  /*-
+  /**
    * If the number of writers > the number of buckets each partitioner will 
keep a state of multiple
-   * writers per bucket as evenly as possible, and will round-robin the 
requests across them, in this
-   * case each writer will target only one bucket at all times (many writers 
-> one bucket). Example:
-   * Configuration: numPartitions (writers) = 5, maxBuckets = 2
-   * Expected behavior:
-   * - Records for Bucket 0 will be "round robin" between Writers 0, 2 and 4
-   * - Records for Bucket 1 will always use Writer 1 and 3
-   * Notes:
-   * - maxNumWritersPerBucket determines when to reset the 
currentBucketWriterOffset to 0 for this bucketId
-   * - When numPartitions is not evenly divisible by maxBuckets, some buckets 
will have one more writer (extraWriter).
-   * In this example Bucket 0 has an "extra writer" to consider before 
resetting its offset to 0.
+   * writers per bucket as evenly as possible, and will round-robin the 
requests across them, in
+   * this case each writer will target only one bucket at all times (many 
writers -> one bucket).
+   *
+   * <p>Example: Configuration: numPartitions (writers) = 5, maxBuckets = 2
+   *
+   * <p>Expected behavior:
+   *
+   * <ul>
+   *   <li>Records for Bucket 0 will be "round robin" between Writers 0, 2 and 
4
+   *   <li>Records for Bucket 1 will always use Writer 1 and 3
+   * </ul>
+   *
+   * <p>Notes:
+   *
+   * <ul>
+   *   <li>maxNumWritersPerBucket determines when to reset the 
currentBucketWriterOffset to 0 for
+   *       this bucketId
+   *   <li>When numPartitions is not evenly divisible by maxBuckets, some 
buckets will have one more
+   *       writer (extraWriter). In this example Bucket 0 has an "extra 
writer" to consider before
+   *       resetting its offset to 0.
+   * </ul>
    *
    * @return the destination partition index (writer subtask id)
    */

Reply via email to