[ZEPPELIN-5897] Remove launcher properties and only use the current context properties #4602
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.
What is this PR for?
This PR removes the double holding of properties.
The main problem: The InterpreterLauncher class is a singleton, because of your PluginManager Cache Implementation.
https://github.com/apache/zeppelin/blob/22ae6cdcd1f526b66808c2b994b53f808f390cfe/zeppelin-zengine/src/main/java/org/apache/zeppelin/plugin/PluginManager.java#L104C23-L126
As a result, every InterpreterProcess started by an InterpreterLauncher has the same properties, because we have the following lines of code in almost all launchers.
zeppelin/zeppelin-plugins/launcher/yarn/src/main/java/org/apache/zeppelin/interpreter/launcher/YarnInterpreterLauncher.java
Line 44 in 22ae6cd
zeppelin/zeppelin-plugins/launcher/k8s-standard/src/main/java/org/apache/zeppelin/interpreter/launcher/K8sStandardInterpreterLauncher.java
Line 107 in 22ae6cd
The problem that arises here is when multiple jobs are started in parallel via CronJobs using one launcher. In the end, the "last" process overwrites the properties of the previous ones. This makes problems, if the individual InterpreterProcesses adjust the properties, as for example in the K8sInterpreterProcess.
zeppelin/zeppelin-plugins/launcher/k8s-standard/src/main/java/org/apache/zeppelin/interpreter/launcher/K8sRemoteInterpreterProcess.java
Lines 447 to 458 in 22ae6cd
For this reason, this PR removes the properties in the launcher object and all launchers are forced to access the properties in the current context.
What type of PR is it?
Bug Fix
Improvement
Refactoring
What is the Jira issue?
How should this be tested?
Questions: