zhedoubushishi opened a new pull request #4844: URL: https://github.com/apache/hudi/pull/4844
## *Tips* - *Thank you very much for contributing to Apache Hudi.* - *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.* ## What is the purpose of the pull request When not passing SparkMaster, by default Hudi CLI should use [SparkUtil.DEFAULT_SPARK_MASTER](https://github.com/apache/hudi/blob/release-0.10.0/hudi-cli/src/main/java/org/apache/hudi/cli/utils/SparkUtil.java#L44). However, w/ a recent [code change](https://github.com/apache/hudi/commit/445208a0d20b457daeeb5f70995302c92dd19f31) in OSS, when SparkMaster is not passed, it would set Spark master to "" which causes the following exception when initializing a Hudi CLI job: ``` {{org.apache.spark.SparkException: Could not parse Master URL: ''at org.apache.spark.SparkContext$.org$apache$spark$SparkContext$$createTaskScheduler(SparkContext.scala:2999) at org.apache.spark.SparkContext.<init>(SparkContext.scala:567) at org.apache.spark.api.java.JavaSparkContext.<init>(JavaSparkContext.scala:58) ``` ## Brief change log ## Verify this pull request This change added tests and can be verified as follows: - *Added testGetDefaultSparkConf to verify the change.* ## Committer checklist - [x] Has a corresponding JIRA in PR title & commit - [x] Commit message is descriptive of the change - [ ] CI is green - [ ] Necessary doc changes done or have another open PR - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
