Running an Interactive Session With the Livy API
Running an interactive session with Livy is similar to using Spark shell or PySpark, but the shell does not run locally. Instead, it runs in a remote cluster, transferring data back and forth through a network.
The Livy REST API supports GET, POST, and DELETE calls for interactive sessions.
The following example shows how to create an interactive session, submit a statement, and retrieve the result of the statement; the return ID could be used for further queries.