-
Notifications
You must be signed in to change notification settings - Fork 910
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 #5315][FLINK] Propagate HIVE_CONF_DIR on launching Flink engine #5316
Conversation
Also, cc @YesOrNo828 |
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
Codecov Report
@@ Coverage Diff @@
## master #5316 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 590 590
Lines 33429 33436 +7
Branches 4423 4423
======================================
- Misses 33429 33436 +7
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
f09e492
to
2aec430
Compare
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.
@hadoopkandy I left a minor comment, please take a look.
@@ -104,13 +104,23 @@ class FlinkProcessBuilder( | |||
val userJars = conf.get(ENGINE_FLINK_APPLICATION_JARS) | |||
userJars.foreach(jars => flinkExtraJars ++= jars.split(",")) | |||
|
|||
val hiveConfDirOpt = env.get("HIVE_CONF_DIR") | |||
hiveConfDirOpt.foreach { hiveConfDir => | |||
val hiveConf = s"${hiveConfDir}${File.separator}hive-site.xml" |
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.
Would it be better to check if the hive-site.xml file exists here and throw an exception if it doesn't? @hadoopkandy WDYT?
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.
i agree
…ng Flink engine
2aec430
to
3f12acb
Compare
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.
LGTM
### _Why are the changes needed?_ create a Hive catalog in Flink SQL Client as follows: ``` CREATE CATALOG myhive WITH ( 'type' = 'hive', 'hive-conf-dir' = '/opt/hive-conf' ) ``` we should propagate `hive-conf-dir` and pass `HIVE_CONF_DIR` as an env variable to the AppMaster ### _How was this patch tested?_ - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request ### _Was this patch authored or co-authored using generative AI tooling?_ No. Closes #5316 from hadoopkandy/KYUUBI-5315. Closes #5315 3f12acb [kandy01.wang] [KYUUBI #5315] [Improvement] Propagate HIVE_CONF_DIR on launching Flink engine Authored-by: kandy01.wang <kandy01.wang@vipshop.com> Signed-off-by: Cheng Pan <chengpan@apache.org> (cherry picked from commit ffebc64) Signed-off-by: Cheng Pan <chengpan@apache.org>
Thanks, merged to master/1.8 |
@hadoopkandy would you mind linking your email kandy01.wang@vipshop.com to GitHub account? otherwise, your contribution won't be counted by GitHub |
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.
@hadoopkandy I left some comments. PTAL. We could make follow-up PR if necessary.
val builder = new FlinkProcessBuilder("paullam", applicationModeConf) { | ||
override def env: Map[String, String] = envDefault | ||
override def env: Map[String, String] = envWithAllHadoop |
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.
It'd be better to add a new test with hive conf env, leaving this test with default env as a negative case to ensure compatibility with the simplest default setup.
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/flink/FlinkProcessBuilder.scala
Show resolved
Hide resolved
Never mind |
Why are the changes needed?
create a Hive catalog in Flink SQL Client as follows:
we should propagate
hive-conf-dir
and passHIVE_CONF_DIR
as an env variable to the AppMasterHow was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before make a pull request
Was this patch authored or co-authored using generative AI tooling?
No.