Net*_*itz 11 hadoop environment-variables amazon-web-services emr apache-spark
我需要在EMR中设置一个自定义环境变量,以便在运行spark应用程序时可用.
我试过添加这个:
...
--configurations '[
{
"Classification": "spark-env",
"Configurations": [
{
"Classification": "export",
"Configurations": [],
"Properties": { "SOME-ENV-VAR": "qa1" }
}
],
"Properties": {}
}
]'
...
Run Code Online (Sandbox Code Playgroud)
并试图取代"spark-env hadoop-env
但似乎没有任何效果.
aws论坛有这个答案.但我无法弄清楚如何应用它.我正在运行EMR 5.3.1并使用cli中预先配置的步骤启动它:aws emr create-cluster...
将自定义配置(如JSON以下)添加到文件中,例如, custom_config.json
[
{
"Classification": "spark-env",
"Properties": {},
"Configurations": [
{
"Classification": "export",
"Properties": {
"VARIABLE_NAME": VARIABLE_VALUE,
}
}
]
}
]
Run Code Online (Sandbox Code Playgroud)
并且,在创建emr集群时,将文件引用传递给该--configurations
选项
aws emr create-cluster --configurations file://custom_config.json --other-options...
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6422 次 |
最近记录: |