enter link description hereWhen When you use watermarking in Spark you need to ensure that your aggregation knows about the window. The Spark documentationSpark documentation provides some more background.
In your case the code should look something like this
blackList = blackList.withWatermark("timestamp", "2 seconds") .groupBy(window(col("timestamp"), "10 minutes", "5 minutes"), col("bl_iban")) .agg(col("bl_iban"), max("timestamp")); It is important, that the attribute timestamp has the data type timestamp!