0

I have the same problem when I study https://nightlies.apache.org/flink/flink-docs-release-1.14/zh/docs/try-flink/table_api/. When I use tumble window, I got nothing in MySQL sink.

return transactions
            .window(Tumble.over(lit(1).hour()).on($("transaction_time")).as("log_ts"))
            .groupBy($("account_id"), $("log_ts"))
            .select(
                    $("account_id"),
                    $("log_ts").start().as("log_ts"),
                    $("amount").sum().as("amount"));

When I use the default 8 parallelism, I found some subtask didn't receive records from upstream in the web front-end. enter image description here

But when I add tEnv.getConfig().addConfiguration(new Configuration().set(CoreOptions.DEFAULT_PARALLELISM, 1)); in the main function, I got results in the MySQL sink, and the web front-end was like below: enter image description here

Can anybody tell me why?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
王京东
  • 401
  • 4
  • 3

0 Answers0