You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/07/21 03:39:23 UTC

[GitHub] [flink] wuchong commented on a change in pull request #16540: [FLINK-23352][streaming-java] Add configuration for batch size and socket timeout of collect sink

wuchong commented on a change in pull request #16540:
URL: https://github.com/apache/flink/pull/16540#discussion_r673636798



##########
File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/TableSinkITCase.scala
##########
@@ -76,4 +81,22 @@ class TableSinkITCase extends BatchTestBase {
     Assert.assertEquals(expected.sorted, result2.sorted)
   }
 
+  @Test
+  def testCollectSinkConfiguration(): Unit = {
+    tEnv.getConfig.getConfiguration.set(
+      CollectSinkOperatorFactory.MAX_BATCH_SIZE, MemorySize.parse("1b"))
+    try {
+      checkResult("SELECT 1", Seq(row(1)))
+      Assert.fail("Expecting exception thrown from collect sink")
+    } catch {
+      case e: Exception =>
+        MatcherAssert.assertThat(
+          e,
+          FlinkMatchers.containsMessage("Record size is too large for CollectSinkFunction"))

Review comment:
       Could you also tell users how to change the configuretion and the config name in the exception message? 




-- 
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@flink.apache.org

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