flink
flink copied to clipboard
Add input validation to WordCount Tokenizer for robustness
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.
CI report:
- df0532a9fed84d12aab94efe6e1c236246a44905 Azure: FAILURE
Bot commands
The @flinkbot bot supports the following commands:@flinkbot run azurere-run the last Azure build