Spark query and write serving endpoint for hudi-lakehouse #19843
Replies: 2 comments 3 replies
|
I would start with Option A (Spark Thrift Server) for v1, while keeping the Hudi-enabled image and catalog/storage configuration reusable for Spark Connect later. If remote DataFrame applications are a day-one requirement, my preference would change to Option B. To make the proposal easier to read and respond to, I suggest:
My reasons for preferring A initially are:
One scope clarification would help: a write-capable Spark endpoint does not automatically make the agent gateway write-capable. #19411 retains SELECT-only guardrails. Are the proposed writes intended for direct clients, or should this work also include gateway write tools? For validation, I would explicitly include external-commit visibility, concurrent writers, and the outcome of a write when the client times out or cancels. Session separation and engine resource isolation should also be evaluated separately. I would choose B first if notebooks or applications need remote DataFrame transformations immediately, and C if separately managed tenant engines are required from the beginning. Otherwise, one optional Thrift endpoint, a pinned Hudi/Spark combination, and a query/write quickstart seem like a focused first deliverable, with additional endpoints introduced as client demand is demonstrated. This is an architectural preference; I have not validated Hudi compatibility against these server options. |
|
Is there not a easy way to do JDBC/ODBC/ADBC https://github.com/HyukjinKwon/adbc-driver-spark and bet on the spark connect route. thrift-server has so many issues at scale. We just rewrote the layer from scratch for Onehouse's query engine (lakegres). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
We would like to discuss adding a persistent Spark serving endpoint under
hudi-lakehouse, providing interactive query and write access to Hudi tables.The initial lakehouse implementation provides Trino-based query serving and Spark writer examples. A shared Spark endpoint would expose Hudi's Spark SQL and DataFrame capabilities without requiring each client to configure and launch its own Spark application.
Rather than simply adding a Spark Thrift Server chart, we should evaluate the available serving approaches and keep the design friendly to Spark Connect, ADBC, and potentially Substrait.
The goal of this discussion is to collect requirements and compare options, not to require every interface in the first release.
Goals
hudi-lakehouse.INSERT,UPDATE,DELETE, andMERGE INTO.The exact operation set and production requirements for the first version remain open for discussion.
Architecture layers
The relevant technologies address different layers and are not necessarily mutually exclusive:
In particular:
Supporting one does not automatically provide the others, but they are not necessarily mutually exclusive.
Options to consider
Option A: Spark Thrift Server
Deploy Spark Thrift Server with the Hudi bundle, Spark SQL extensions, and shared catalog/storage configuration.
Advantages:
Concerns:
Option B: Spark Connect Server
Deploy Spark Connect as the primary Spark endpoint.
Advantages:
Concerns:
Option C: Kyuubi or another Spark SQL gateway
Use a gateway to manage Spark engines and client sessions.
Advantages:
Concerns:
Option D: Multi-protocol Spark serving
Share a Hudi-enabled Spark image and catalog/storage configuration, while exposing independently enabled endpoints:
This option combines existing serving interfaces rather than introducing a new server implementation.
Advantages:
Concerns:
Initial validation
Before selecting an approach, we should validate:
The first deliverable could then be one optional endpoint with a query/write quickstart, while keeping additional interfaces independently extensible.
Questions for the community
What should the first version support?
Which clients and workloads are essential: JDBC/ODBC tools, remote SQL, or Spark Connect DataFrame applications? Which Hudi write operations are required on day one?
Which serving approach best fits these requirements?
Should we start with Spark Connect, Spark Thrift Server, or a gateway such as Kyuubi? Experience from existing deployments would be helpful.
What isolation and security model is needed initially?
Is a shared Spark application with multiple sessions sufficient, or do we need per-user engines, stronger resource isolation, and multi-tenant authentication from the beginning?
What level of ADBC support should we target?
Is a compatible driver or adapter sufficient initially, or is there a concrete need for an Arrow Flight SQL endpoint?
What concrete Hudi use case would benefit from accepting Substrait plans?
Feedback on requirements, protocol preferences, and operational experience would be very helpful.
Related work
hudi-lakehouseimplementation.All reactions