Replies: 11 comments 40 replies
-
The livy Multi node HA for batch sessions |
Beta Was this translation helpful? Give feedback.
-
kpip 4,let’s send a discuss mail to dev to bring more attention? |
Beta Was this translation helpful? Give feedback.
-
Is batch id a JSON string {"pubid":"xxx", "secretId":xxx, "optionalType":xxx}? |
Beta Was this translation helpful? Give feedback.
-
curl -X GET /batches/state -d curl -X GET /batches/log -d maybe, we use such API is good for Kyuubi BE |
Beta Was this translation helpful? Give feedback.
-
if we follow this format and if we introduce operations in a session, |
Beta Was this translation helpful? Give feedback.
-
does the batches listing api support filter, such as batchType? |
Beta Was this translation helpful? Give feedback.
-
files and jars support remote filesystem ? or only at Kyuubi Server local ? |
Beta Was this translation helpful? Give feedback.
-
because the batchId can not be a So How about refactor the API to
|
Beta Was this translation helpful? Give feedback.
-
On second thought, the batch id could be designed as a public id, as we can buffer the secret id at the server-side as a static string. when batch id is transformed to handles, we always use this static secret id |
Beta Was this translation helpful? Give feedback.
-
I also want to enable batch job submission with kyuubi beeline after the restful api finished. TODO:
|
Beta Was this translation helpful? Give feedback.
-
What's a batch job? A sequence of SQLs |
Beta Was this translation helpful? Give feedback.
-
Motivation
Apache Kyuubi is a distributed multi-tenant JDBC server for large-scale data processing and analytics.
It now supports spark-sql and spark-scala query.
We want to enabled kyuubi to support submit batch job.
So that we can provide the spark job submission service instead of delivering the spark binary per Spark release.
Core domain objects and relationships
BatchesResource
The
ApiRequestContext
for batch job submission.KyuubiBatchSession
The session for batch use case.
BatchJobSubmission
The operation for batch job submission.
SparkBatchProcessBuilder
The process builder for spark job submission.
API Design
GET /batches
Returns all the active batch sessions.
Request Parameters
Response Body
POST /batches
Request Body
Response Body
The created Batch object.
GET /batches/{batchId}
Returns the batch session information.
Response Body
The Batch.
DELETE /batches/${batchId}
Kills the Batch job.
GET /batches/${batchId}/localLog
Gets the local log lines from this batch.
Request Parameters
Response Body
Batch
such as id,
kyuubi instance url,
batch url.
Implementation
In this section, we describe the implementation of Kyuubi
BatchesResource
.Batch Job Submission
Batch job conf
We need predefine some common parameters and some batch job conf ignore list.
kyuubi.batchConf.<engine>.
for batch jobspark.master
andspark.yarn.deployMode
specified by userBatch Job ProcessBuilder(For spark currently)
For Spark,
batchId is unique(UUID), lookup the unique YARN_TAG from RM to get an applicationReport.
KyuubiBatchSessionImpl
It is to align with the current session-operation architecture, one KyuubiBatchSessionImpl on one BatchJobSubmission operation.
We will validate the batch job submission conf in the KyuubiBatchSessionImpl.
BatchSession HA across kyuubi server instances
This part designs the HA only for BatchSession across kyuubi server instances, not for interactive KyuubiSession, i.e. users can access a batch session through any of the Kyuubi instances at any time. It only covers Yarn mode and with Zookeeper as the batch session store.
At first, the batch session information across all kyuubi instances should be kept in sync and coherent. So, we need to use a shared state store - Zookeeper. Once a batch session is created on a Kyuubi instance, it should be accessible to Kyuubi users through all other kyuubi instances. Batch session information can change at any time during its lifetime. A change in the batch session information on one kyuubi instance should be visible through all other kyuubi instances.
In case a Kyuubi instance fails, other instances should keep the normal behavior. Once the kyuubi instance recovers from failure, it should read batch session information and recover them.
During the recovery phase, the instance should not accept any new request until the recovery process ends.
Limitation
The resource/jars/files used for batch jobs should be on global file systems, such as HDFS, S3.
Beta Was this translation helpful? Give feedback.
All reactions