如何使用数据工厂在 HDInsights 群集中设置自定义 Spark 参数

How to setup custom Spark parameter in HDInsights cluster with Data Factory

我正在根据这个在 Azure 上创建 HDInsights 集群 desciption

现在我想设置spark自定义参数,例如 spark.yarn.appMasterEnv.PYSPARK3_PYTHON 或 spark_daemon_memory 在集群置备时。

是否可以使用数据 Factory/Automation 帐户进行设置?我找不到任何这样做的例子。

谢谢

您可以在数据工厂中使用 SparkConfig 将这些配置传递给 Spark。

例如:

"typeProperties": {
...
  "sparkConfig": {
     "spark.submit.pyFiles": "/dist/package_name-1.0.0-py3.5.egg",
     "spark.yarn.appMasterEnv.PYSPARK_PYTHON": "/usr/bin/anaconda/envs/py35/bin/python3"
  }
}

通过这种方式,您可以指定 docs here 中列出的所有 Spark 配置。