This repository was archived by the owner on Jan 9, 2020. It is now read-only.
forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 117
Submission client redesign to use a step-based builder pattern #365
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9ff8c69
Submission client redesign to use a step-based builder pattern.
mccheah c23bb4c
Add a unit test for BaseSubmissionStep.
mccheah f8d28b8
Add unit test for kubernetes credentials mounting.
mccheah 90f77fb
Add unit test for InitContainerBootstrapStep.
mccheah 01b8d18
unit tests for initContainer
ifilonenko db1f0c2
Add a unit test for DependencyResolutionStep.
mccheah 20d9a90
further modifications to InitContainer unit tests
ifilonenko 1fb49a0
Merge branch 'submission-steps-refactor' of https://github.com/apache…
ifilonenko 11c95e9
Use of resolver in PythonStep and unit tests for PythonStep
ifilonenko 80a186d
refactoring of init unit tests and pythonstep resolver logic
ifilonenko 1f58411
Add unit test for KubernetesSubmissionStepsOrchestrator.
mccheah 31985a6
refactoring and addition of secret trustStore+Cert checks in a Submis…
ifilonenko 9e002aa
added SparkPodInitContainerBootstrapSuite
ifilonenko 61a7561
Added InitContainerResourceStagingServerSecretPluginSuite
ifilonenko fa78aad
style in Unit tests
ifilonenko c477a0c
extremely minor style fix in variable naming
ifilonenko 5a76328
Address comments.
mccheah 16adf71
Merge branch 'submission-steps-refactor' of github.com:apache-spark-o…
mccheah ed52eee
Rename class for consistency.
mccheah 397312c
Attempt to make spacing consistent.
mccheah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...core/src/main/scala/org/apache/spark/deploy/kubernetes/PodWithDetachedInitContainer.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.spark.deploy.kubernetes | ||
|
|
||
| import io.fabric8.kubernetes.api.model.{Container, Pod} | ||
|
|
||
| private[spark] case class PodWithDetachedInitContainer( | ||
| pod: Pod, | ||
| initContainer: Container, | ||
| mainContainer: Container) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if it makes sense for
(childArgs, childClasspath, sysProps, childMainClass)to be modeled as a case class with builder pattern, for similar reasons. Tangentially, mutable collections can be hazardous if not handled carefully - a case-class pattern using immutable collections might be worthwhile, given the complexity of the environment constructionsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have many better options here because
SparkSubmitcreates the submission client implementation reflectively and only expects the submission client to have a main method with a list of arguments. This is to account for the fact that the core module of Spark doesn't have a compile time dependency on the specific submission client implementations for the different cluster managers.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
Client.scalawe parse the arguments array into a case class and report on errors when fields are missing.