Livy POST batche API with spark.driver.extraJavaOptions



如何添加spark.driver.extrajavaoptions和livy post/batch api调用?我需要传递其他-D(JVM系统属性(。

您可以参考Livy Rest API DOC:https://livy.incubator.apache.org/docs/latest/rest-rest-api.html

当您发布/沐浴JSON主体时,您可以通过包含所需SparkConf配置的"conf": {"key": "value"}地图。例如:

{
  "name": "SparkPi-01",
  "className": "org.apache.spark.examples.SparkPi",
  "numExecutors": 2,
  "file": "local:///opt/spark/examples/jars/spark-examples_2.11-2.4.3.jar",
  "args": ["10000"],
  "conf": {
    "spark.driver.extraJavaOptions": "-D... -XX...",
    "spark.executor.extraJavaOptions": "-D... -XX...",
  }
}

请注意,根据您的环境,您可以覆盖extraJavaOptions配置的预配置的默认值。

最新更新