Commit 8c3194f
[SPARK-52348][CONNECT] Add support for Spark Connect handlers for pipeline commands
### What changes were proposed in this pull request?
- Introduces a `PipelinesHandler` which handles SparkConnect PipelineCommands. This follows the pattern of `MLHandler` where the `SparkConnectPlanner` delegates any ML commands to the `MLHandler`
- Stream `PipelineEvent`s that are emitted during pipeline execution back to the SparkConnect client
- Rethrow exceptions that occur during pipeline execution in the `StartRun` handler so that they are automatically propagated back to the SC client
This is PR builds off changes in a few open PRs. I have squashed those changes into a single commit at the top of this PR - 49626fb2e6af0e5a2df5e3ad361f6e98b88ad297. **When reviewing please ignore that commit and just review all commits after that one.**
Misc changes:
- Convert to timestamp field in `PipelineEvent` proto from `String` to `google.protobuf.Timestamp`
- Remove references to `SerializedException` and `ErrorDetail` in favor of representing errors just as `Throwable`
### Why are the changes needed?
This change is needed to support Spark Declarative Pipelines.
### Does this PR introduce _any_ user-facing change?
Yes
### How was this patch tested?
New unit tests
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #51057 from jonmio/sc-pipelines.
Authored-by: Jon Mio <jon.mio@databricks.com>
Signed-off-by: Herman van Hovell <herman@databricks.com>1 parent 1a3ae66 commit 8c3194f
File tree
30 files changed
+1917
-436
lines changed- common/utils/src/main/resources/error
- python/pyspark
- pipelines
- sql/connect
- client
- proto
- sql
- connect
- common/src/main/protobuf/spark/connect
- server
- src
- main/scala/org/apache/spark/sql/connect
- pipelines
- planner
- service
- test/scala/org/apache/spark/sql/connect
- pipelines
- service
- pipelines/src
- main/scala/org/apache/spark/sql/pipelines
- graph
- logging
- test/scala/org/apache/spark/sql/pipelines
- graph
- logging
- utils
30 files changed
+1917
-436
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
924 | 930 | | |
925 | 931 | | |
926 | 932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7470 | 7470 | | |
7471 | 7471 | | |
7472 | 7472 | | |
| 7473 | + | |
| 7474 | + | |
| 7475 | + | |
| 7476 | + | |
| 7477 | + | |
| 7478 | + | |
7473 | 7479 | | |
7474 | 7480 | | |
7475 | 7481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | | - | |
| 176 | + | |
174 | 177 | | |
175 | 178 | | |
176 | 179 | | |
| |||
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
182 | | - | |
| 185 | + | |
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
| |||
204 | 207 | | |
205 | 208 | | |
206 | 209 | | |
207 | | - | |
| 210 | + | |
208 | 211 | | |
209 | 212 | | |
210 | | - | |
| 213 | + | |
211 | 214 | | |
212 | 215 | | |
213 | 216 | | |
214 | 217 | | |
215 | 218 | | |
216 | 219 | | |
217 | | - | |
| 220 | + | |
218 | 221 | | |
219 | 222 | | |
220 | 223 | | |
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
225 | | - | |
| 228 | + | |
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
229 | | - | |
| 232 | + | |
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | | - | |
62 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1474 | 1474 | | |
1475 | 1475 | | |
1476 | 1476 | | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
1477 | 1481 | | |
1478 | 1482 | | |
1479 | 1483 | | |
| |||
0 commit comments