This is an automated email from the ASF dual-hosted git repository. xxyu pushed a commit to branch kylin5 in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 9353a978e21536a3823d9051190ef612e6767dbe Author: Yinghao Lin <39019287+yhca...@users.noreply.github.com> AuthorDate: Wed Oct 19 11:11:32 2022 +0800 KYLIN-5330 Fix yarn am container log --- .../src/main/scala/org/apache/spark/utils/SparkHadoopUtils.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/spark-project/spark-common/src/main/scala/org/apache/spark/utils/SparkHadoopUtils.scala b/src/spark-project/spark-common/src/main/scala/org/apache/spark/utils/SparkHadoopUtils.scala index 2aa884227f..d6e77356bf 100644 --- a/src/spark-project/spark-common/src/main/scala/org/apache/spark/utils/SparkHadoopUtils.scala +++ b/src/spark-project/spark-common/src/main/scala/org/apache/spark/utils/SparkHadoopUtils.scala @@ -24,6 +24,10 @@ import org.apache.spark.deploy.SparkHadoopUtil object SparkHadoopUtils { def newConfigurationWithSparkConf(): Configuration = { - SparkHadoopUtil.newConfiguration(SparkEnv.get.conf) + val sparkEnv = SparkEnv.get + if (sparkEnv != null) { + SparkHadoopUtil.newConfiguration(sparkEnv.conf) + } + new Configuration() } }