如果我不提供大师,请问这里的主人是什么? [英] What is the master here if I don't provide one?

查看:46
本文介绍了如果我不提供大师,请问这里的主人是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 http://spark.apache.org/docs/latest/submitting-applications.html#launching-applications-with-spark-submit 应使用

./bin/spark-submit \
  --class <main-class> \
  --master <master-url> \
  --deploy-mode <deploy-mode> \
  --conf <key>=<value> \
  ... # other options
  <application-jar> \
  [application-arguments]

即使我使用

val spark = SparkSession
      .builder
      .getOrCreate()

(因此没有一行 .master("local")或类似的东西)并且没有-master 选项,我的应用程序运行.页面 http://spark.apache.org/docs/latest/configuration.html#available-properties 表示master没有默认值.这是怎么回事?

(thus without a line .master("local") or something similar) and have no --master option, my application runs. The page http://spark.apache.org/docs/latest/configuration.html#available-properties says that master has no default. What is happening here?

推荐答案

  • 如果在 spark-defaults.conf 中将 spark.master 设置为它的值.
  • 否则 local [*] .
    • if spark.master is set it in the spark-defaults.conf it is its value.
    • otherwise local[*].
    • 这篇关于如果我不提供大师,请问这里的主人是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆