Controlling continuous applications

Once a continuous application (even a simple one, not taking historic data into account) is started and running, it has to be controlled somehow as the call to the start method immediately starts processing, but also returns without blocking. In case you want your program to block at this stage until the application has finished, one can use the awaitTermination method as follows:

query.awaitTermination()

This is particularly important when precompiling code and using the spark-submit command. When using spark-shell, the application is not terminated anyway.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.160.181