flink icon indicating copy to clipboard operation
flink copied to clipboard

Add input validation to WordCount Tokenizer for robustness

Open Diogo-Sardagna opened this issue 5 months ago • 1 comments

Introduces a defensive check at the beginning of the ‘flatMap’ method in the WordCount.Tokenizer class to ensure the input string is neither null nor blank. This change prevents unnecessary computation and avoids potential runtime exceptions caused by malformed or empty input data. It increases the robustness of the WordCount example, especially in streaming scenarios where data sources may emit invalid or incomplete records. This contributes to safer processing and better fault tolerance.

Diogo-Sardagna avatar Jul 03 '25 22:07 Diogo-Sardagna

CI report:

  • df0532a9fed84d12aab94efe6e1c236246a44905 Azure: FAILURE
Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

flinkbot avatar Jul 03 '25 23:07 flinkbot