我真的希望使用OpsCenter 6.0.2将以下设置添加到我们的spark-defaults.conf中,以避免配置漂移。是否可以将这些配置项添加到配置文件模板中?
spark.cores.max 4
spark.driver.memory 2g
spark.executor.memory 4g
spark.python.worker.memory 2g发布于 2016-09-10 08:50:28
备注:正如Mike Lococo在此答案的注释中指出的那样-此答案可能会更新配置文件值,但不会导致这些值被写入spark-defaults.conf。
以下内容不是解决方案!
可以;您必须通过LCM config profile API (https://docs.datastax.com/en/opscenter/6.0/api/docs/lcm_config_profile.html#lcm-config-profile)更新配置文件。
首先,确定需要更新的配置文件:
$ curl http://localhost:8888/api/v1/lcm/config_profiles获取需要更新的特定配置文件的href,请求它,并将响应正文保存到一个文件中:
$ curl http://localhost:8888/api/v1/lcm/config_profiles/026fe8e3-0bb8-49c1-9888-8187b1624375 > profile.json现在,在您刚刚保存到的profile.json文件中,添加或编辑位于json > spark-defaults-conf的密钥,以包含以下密钥:
"spark-defaults-conf": {
"spark-cores-max": 4,
"spark-python-worker-memory": "2g",
"spark-ssl-enabled": false,
"spark-drivers-memory": "2g",
"spark-executor-memory": "4g"
}保存更新后的profile.json。最后,使用编辑后的文件作为请求数据,对相同的配置文件URL执行HTTP PUT:
$ curl -X PUT http://localhost:8888/api/v1/lcm/config_profiles/026fe8e3-0bb8-49c1-9888-8187b1624375 -d @profile.jsonhttps://stackoverflow.com/questions/39418922
复制相似问题