Skip to content

feat: support inherit env variables for spark#3450

Merged
vagetablechicken merged 1 commit into4paradigm:mainfrom
vagetablechicken:i3448
Aug 23, 2023
Merged

feat: support inherit env variables for spark#3450
vagetablechicken merged 1 commit into4paradigm:mainfrom
vagetablechicken:i3448

Conversation

@vagetablechicken
Copy link
Copy Markdown
Collaborator

@vagetablechicken vagetablechicken commented Aug 18, 2023

close #3448

@github-actions github-actions bot added documentation Improvements or additions to documentation task-manager openmldb taskmanager labels Aug 18, 2023
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 18, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.03% 🎉

Comparison is base (fd728c6) 75.77% compared to head (cb3061f) 75.80%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3450      +/-   ##
============================================
+ Coverage     75.77%   75.80%   +0.03%     
  Complexity      414      414              
============================================
  Files           703      703              
  Lines        127658   127658              
  Branches       1206     1200       -6     
============================================
+ Hits          96729    96769      +40     
+ Misses        30688    30648      -40     
  Partials        241      241              
Files Changed Coverage Δ
...openmldb/taskmanager/config/TaskManagerConfig.java 0.00% <0.00%> (ø)
...m/openmldb/taskmanager/spark/SparkJobManager.scala 0.00% <0.00%> (ø)

... and 13 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

val env: java.util.Map[String, String] = new java.util.HashMap[String, String]
// config may empty, need check
if (!TaskManagerConfig.isEmpty(TaskManagerConfig.HADOOP_CONF_DIR)) {
env.put("HADOOP_CONF_DIR", TaskManagerConfig.HADOOP_CONF_DIR)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test taskmanager conf file > system env

Copy link
Copy Markdown
Collaborator Author

@vagetablechicken vagetablechicken Aug 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test on new taskmanager, check by classpath print of zk in log file: if conf file, HADOOP_CONF_DIR in conf file is in the print, if no conf file, use the system env.
But the system env is passed by taskmanager too. So I test one more case:

  • set HADOOP_CONF_DIR in user scope, dir1
  • start taskmanager with conf option, dir2, pass to sparklauncher
  • change env HADOOP_CONF_DIR (no effect) dir3
  • submit spark job, use which env?

result: use the taskmanager conf

@vagetablechicken vagetablechicken merged commit c19aa7f into 4paradigm:main Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation task-manager openmldb taskmanager

Projects

None yet

Development

Successfully merging this pull request may close these issues.

taskmanager: inherit env variables for spark, and config parse refactor

3 participants