Bartnik, AdrianDel Monte, BonaventuraRabl, TilmannMarkl, VolkerGrust, TorstenNaumann, FelixBöhm, AlexanderLehner, WolfgangHärder, TheoRahm, ErhardHeuer, AndreasKlettke, MeikeMeyer, Holger2019-04-112019-04-112019978-3-88579-683-1https://dl.gi.de/handle/20.500.12116/21739Stream Processing Engines (SPEs) must tolerate the dynamic nature of unbounded data streams and provide means to quickly adapt to fluctuations in the data rate. Many major SPEs however provide very little functionality to adjust the execution of a potentially infinite streaming query at runtime. Each modification requires a complete query restart, which involves an expensive redistribution of the state of a query and may require external systems in order to guarantee correct processing semantics. This results in significant downtime, which increase the operational cost of those SPEs. We present a modification protocol that enables modifying specific operators as well as the data flow of a running query while ensuring exactly-once processing semantics. We provide an implementation for Apache Flink, which enables stateful operator migration across machines, the introduction of new operators into a running query, and changes to a specific operator based on external triggers. Our results on two benchmarks show that migrating operators for queries with small state is as fast as using the savepoint mechanism of Flink. Migrating operators in the presence of large state even outperforms the savepoint mechanism by a factor of more than 2.3. Introducing and replacing operators at runtime is performed in less than 10 s. Our modification protocol demonstrates the general feasibility of runtime modifications and opens the door for many other modification use cases, such as online algorithm tweaking and up-or downscaling operator instances.enData Stream ProcessingResource ElasticityQuery Plan MaintenanceFault ToleranceOn-the-fly Reconfiguration of Query Plans for Stateful Stream Processing Engines10.18420/btw2019-091617-5468