-
Notifications
You must be signed in to change notification settings - Fork 862
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
[KYUUBI #6344] FlinkProcessBuilder prioritizes user configurations #6342
Conversation
the patch involves user-facing changes, to un-confuse users and future exploeres, can you elaborate more on the background and behavior change in PR description? |
kyuubi may not directly face users, but be connected to the upper application platform. Just like kyuubi adds session id in yarn tags, we also hope to be able to add the upper application platform id into yarn tags, as well as the application name. |
In my scenario this is a bug fix, just before this change if we specified flink.yarn.ship-files=customShipFile it would override the flinkExtraJars specified in kyuubi, I think we should merge them. |
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.
@wForget Now I understand the motivation. I agree we should merge the user-specified configurations with the Kyuubi generated ones. I left some comments inline, PTAL.
@@ -115,7 +115,9 @@ object KyuubiApplicationManager { | |||
} | |||
|
|||
private def setupFlinkYarnTag(tag: String, conf: KyuubiConf): Unit = { | |||
val originalTag = conf.getOption(FlinkProcessBuilder.YARN_TAG_KEY).map(_ + ",").getOrElse("") | |||
val originalTag = conf.getOption(s"flink.${FlinkProcessBuilder.YARN_TAG_KEY}") |
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.
Could we avoid the hardcoded flink.
prefix?
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.
BTW is this change compatible with Kyuubi's kill-application-by-tag mechanism?
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.
Could we avoid the hardcoded flink. prefix?
Sure, I will add a constant for it.
BTW is this change compatible with Kyuubi's kill-application-by-tag mechanism?
It is compatible, the previous logic also merges user-specified tags, I just added the key prefixed by flink.
.
Submitted an issue #6344 and recorded error details. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6342 +/- ##
============================================
- Coverage 58.45% 58.43% -0.02%
Complexity 24 24
============================================
Files 653 653
Lines 39865 39889 +24
Branches 5481 5482 +1
============================================
+ Hits 23303 23310 +7
- Misses 14073 14075 +2
- Partials 2489 2504 +15 ☔ View full report in Codecov by Sentry. |
@@ -115,7 +115,10 @@ object KyuubiApplicationManager { | |||
} | |||
|
|||
private def setupFlinkYarnTag(tag: String, conf: KyuubiConf): Unit = { | |||
val originalTag = conf.getOption(FlinkProcessBuilder.YARN_TAG_KEY).map(_ + ",").getOrElse("") | |||
val originalTag = conf | |||
.getOption(s"${FlinkProcessBuilder.FLINK}.${FlinkProcessBuilder.YARN_TAG_KEY}") |
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.
even they are same string, it's for different purpose ...
.getOption(s"${FlinkProcessBuilder.FLINK}.${FlinkProcessBuilder.YARN_TAG_KEY}") | |
.getOption(s"flink.${FlinkProcessBuilder.YARN_TAG_KEY}") |
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.
makes sense, let’s add a FLINK_CONF_PREFIX
constant.
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/flink/FlinkProcessBuilder.scala
Outdated
Show resolved
Hide resolved
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/flink/FlinkProcessBuilder.scala
Outdated
Show resolved
Hide resolved
@@ -212,9 +220,12 @@ class FlinkProcessBuilder( | |||
} | |||
|
|||
object FlinkProcessBuilder { | |||
final val FLINK_EXEC_FILE = "flink" | |||
final val FLINK = "flink" | |||
final val APP_KEY = "flink.app.name" |
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.
why this has a flink.
suffix, but others does not?
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.
why this has a
flink.
suffix, but others does not?
Because this is not a valid flink conf, it should be:
kyuubi/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/flink/FlinkProcessBuilder.scala
Line 227 in 17df084
final val YARN_APPLICATION_NAME_KEY = "yarn.application.name" |
# 🔍 Description ## Issue References 🔗 This pull request fixes #6344 `FlinkProcessBuilder` specifies `yarn.ship-files`, `yarn.application.name` and `yarn.tags` configurations of kyuubi platform. Sometimes we also need to customize these configurations, so we should prioritize these user configurations. ## Describe Your Solution 🔧 FlinkProcessBuilder prioritizes user configurations. ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 #### Related Unit Tests added new unit test --- # Checklist 📝 - [X] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6342 from wForget/hotfix2. Closes #6344 feca972 [wforget] address comment 17df084 [wforget] fix test and add flink constant ece91cc [wforget] FlinkProcessBuilder prioritizes user configurations Authored-by: wforget <643348094@qq.com> Signed-off-by: wforget <643348094@qq.com> (cherry picked from commit c8e6457) Signed-off-by: wforget <643348094@qq.com>
Thanks, merged to master and branch-1.9. |
🔍 Description
Issue References 🔗
This pull request fixes #6344
FlinkProcessBuilder
specifiesyarn.ship-files
,yarn.application.name
andyarn.tags
configurations of kyuubi platform. Sometimes we also need to customize these configurations, so we should prioritize these user configurations.Describe Your Solution 🔧
FlinkProcessBuilder prioritizes user configurations.
Types of changes 🔖
Test Plan 🧪
Behavior Without This Pull Request ⚰️
Behavior With This Pull Request 🎉
Related Unit Tests
added new unit test
Checklist 📝
Be nice. Be informative.