如何在 AWS Glue 中设置多个 --conf 表参数?

Zam*_*lli 5 amazon-web-services aws-glue

AWS Glue 的 stackoverflow 上的多个答案说要设置 --conf 表参数。但是,有时在一个作业中我们需要在 1 个作业中设置多个 --conf 键值对。

我尝试了以下方法来设置多个 --conf 值,从而导致错误:

  • 添加另一个名为 --conf 的表参数。这会导致 AWS 仪表板删除名为 --conf 的第二个参数,并将焦点设置为名为 --conf 的第一个参数的值。Terraform 也只认为带有键的两个表参数--conf相等,并用第二个参数覆盖第一个参数中的值。
  • 在表 --conf 参数的值中用空格分隔配置键值参数。EG spark.yarn.executor.memoryOverhead=1024 spark.yarn.executor.memoryOverhead=7g spark.yarn.executor.memory=7g。这会导致无法启动作业。
  • 在表 --conf 参数的值中用逗号分隔配置键值参数。EG spark.yarn.executor.memoryOverhead=1024, spark.yarn.executor.memoryOverhead=7g, spark.yarn.executor.memory=7g。这会导致无法启动作业。
  • 将 --conf 的值设置为--conf字符串分隔每个键值。EG spark.yarn.executor.memoryOverhead=1024 --conf spark.yarn.executor.memoryOverhead=7g --conf spark.yarn.executor.memory=7g。这会导致胶水作业挂起。

如何在 AWS Glue 中设置多个 --conf 表参数?

小智 8

您可以传递多个参数,如下所示:

关键:-- conf

值: spark.yarn.executor.memoryOverhead=7g --conf spark.yarn.executor.memory=7g

这对我有用。