You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/02/22 11:36:25 UTC

[GitHub] [iceberg] openinx commented on a change in pull request #4189: Flink 1.14: Fix the flaky testHashDistributeMode by controlling rows in one checkpoint precisely

openinx commented on a change in pull request #4189:
URL: https://github.com/apache/iceberg/pull/4189#discussion_r811852248



##########
File path: flink/v1.14/flink/src/test/java/org/apache/iceberg/flink/TestFlinkTableSink.java
##########
@@ -253,15 +258,24 @@ public void testHashDistributeMode() throws Exception {
         "write.format.default", format.name(),
         TableProperties.WRITE_DISTRIBUTION_MODE, DistributionMode.HASH.modeName()
     );
+
+    // Initialize a BoundedSource table to precisely control that those 9 rows will be emitted in only one checkpoint.
+    List<Row> dataSet = ImmutableList.of(
+        Row.of(1, "aaa"), Row.of(1, "bbb"), Row.of(1, "ccc"),
+        Row.of(2, "aaa"), Row.of(2, "bbb"), Row.of(2, "ccc"),
+        Row.of(3, "aaa"), Row.of(3, "bbb"), Row.of(3, "ccc"));
+    String dataId = BoundedTableFactory.registerDataSet(ImmutableList.of(dataSet));

Review comment:
       I think a single checkpoint is good enough to validate the PartitionKeySelector. More checkpoints will make the unit test more complex but validate the same thing in my mind. 
   
   Mocking more records as the testing data set looks good to me.




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org