From f6ab112eef0f8a20f3357becc5fd6146da6c28b2 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Wed, 4 Apr 2018 18:21:33 -0300 Subject: [PATCH] Added a warning about how bad the code looks. --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 72eaeec..c3f0671 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,19 @@ the Flink jargon, which basically are consecutive blocks of elements split by their event time). Once the elements are grouped in their windows, we want them to go to different sinks (stored). +## WARNING! + +This code is hard to read on purpose; the general idea was to produce a single +file that could be read in a sitting. + +On general, I'd move each Function to its own class and simply add the class +directly into the function call. For example, instead of doing `.process(new +ProcessFunction[Metric, Metric]) { blah, blah blah }`, I'd create a class that +extends `ProcessFunction` and use that class instead in `new ProcessFunction`. + +The current way is more explicit, but creating classes directly in the pipeline +makes it a hell to read. + ## The layout ### Metrics