-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LIVY-246. Support multiple Spark environments in Livy #232
Open
jerryshao
wants to merge
5
commits into
cloudera:master
Choose a base branch
from
jerryshao:LIVY-246
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Codecov Report
@@ Coverage Diff @@
## master #232 +/- ##
============================================
+ Coverage 70.46% 71.03% +0.57%
- Complexity 726 742 +16
============================================
Files 96 97 +1
Lines 5123 5183 +60
Branches 774 779 +5
============================================
+ Hits 3610 3682 +72
+ Misses 996 981 -15
- Partials 517 520 +3
Continue to review full report at Codecov.
|
Change-Id: Ib05f074f2470f67101c76d7de7c3c41c3c9632a7
Change-Id: I8100820a7ac05a6568a1c05fe63f4b05c0cf5278
Change-Id: I6ef0650f135c0dbf5e57437ef6cd93c98d9352e7
Change-Id: I0e66ff509903ab276ca816818e4b288b45699213
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR propose to add a
SparkEnvironment
to isolate Spark's related configurations and libraries, also extend it to support multipleSparkEnvironment
in LivyServer.Why
Current Livy Supports different Sparks with one build, user could configure different spark home to choose the right Spark to run, but this still requires stopping LivyServer, updating configuration and restarting it. To further extend the usability of Livy, it would be better to support different Sparks in runtime, when user create a session, user could specify which Spark they wanted and Livy will pick right Spark and start application.
How to use
To enable it, we extend the Livy configurations to support multiple Spark profiles, user could configure:
Internally Livy will create two Spark environments "test" and "product", when user issue a session creation request, he could specify
sparkEnv
with "test" in JSON body. Livy will pick the right Spark environment and start application.To be compatible with existing configuration and test, if user configured:
This is equal to:
Livy will treat these as "default" Spark environment. If user didn't specify
sparkEnv
in JSON body, then the default one will be picked.Implementation
To achieve this, I introduced a
SparkEnvironment
class, one LivyServer can have multipleSparkEnvironment
based on configuration. Also I refactored the code to move Spark related codes into this class.Limitation
Some configurations like spark master and deploy mode cannot be configured per Spark environment currently.
Works done and to be done
Please review and suggest, thanks a lot.