Scala的新手,我们计划用Scala / Spark实施新的应用程序。有没有办法可以拥有类似于Spring Cloud Config Server的外部属性文件?
我以“外部”假设您是指在其他服务器上。
参考:https://spark.apache.org/docs/latest/configuration.html#loading-default-configurations
尚无内置支持,但有两个选择:
SPARK_CONF_DIR
之前将配置文件下载到主服务器上的spark-submit
(或使用--properties-file customconfig.conf
作为spark-submit
的参数)