k3rnL opened a new pull request, #488: URL: https://github.com/apache/incubator-livy/pull/488
## What changes were proposed in this pull request? This PR introduces a Task system alongside the existing Statement mechanism. The goal is to provide an API that behaves similarly to statements but supports retrieving job results even after completion, which is particularly useful when Livy is used by scalable backend applications where the original request context may no longer exist once the job finishes. *How is this different from the existing Job API?* The current Job API is primarily an internal mechanism, mainly used for operations such as driver pings or adding JARs. It’s also leveraged by the Java/Scala clients, even though the endpoint itself is not officially documented. Moreover, jobs managed through this API are handled solely by the server and may execute on the same thread as Netty. In contrast, the new Task API is an official public API for running serialized jobs from native Java/Scala applications within the same isolated driver environment as statements. Tasks are fully managed by the session on the driver side and follow the same lifecycle and garbage collection policies as statements. Additionally, the API exposes progress information and other metadata similar to what’s available for statements. While the Job API is a one-shot mechanism (the job is destroyed as soon as its result is fetched), the Task API supports multiple result fetches, making it more suitable for scalable, asynchronous systems. ## How was this patch tested? This change was validated through unit tests and integration testing within our production environment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
