Hello dev, I'm currently working on [FLINK-2021] Rework examples to use ParameterTool <https://issues.apache.org/jira/browse/FLINK-2021> and we're trying to improve the readability of the K-Means example until we reach a satisfactory starting point to rework the other examples as well. I think Robert's improvements <https://github.com/rmetzger/flink/blob/4c3b569b522172043fe1f49da2858bae37519eef/flink-examples/flink-examples-batch/src/main/java/org/apache/flink/examples/java/clustering/KMeans.java> (not relying on RequiredParameters and removal of static variables, in particular) are good enough to be that starting point and integrated those changes in the PR <https://github.com/apache/flink/pull/1536>.
Before moving on I'd like to have a feedback on the work done so far. Also: what would you think of moving POJOs and user functions to separate files to declutter the main class? I've noticed that both in the examples and in the training solutions there's a general tendency to keep everything in one place, however my feeling is that splitting the classes would keep files short and readable, while allowing quick navigation between files/classes in most editors without having to scroll through the file to reach the code you're interested in. -- BR, Stefano Baghino Software Engineer @ Radicalbit