* add `-Dlog4j.configuration=<location of configuration file>` to `spark.driver.extraJavaOptions` (for the driver) or `spark.executor.extraJavaOptions` (for executors). Note that if using a file, the `file:` protocol should be explicitly provided, and the file needs to exist locally on all the nodes.
@@ -317,7 +317,7 @@ It also allows a different address from the local one to be advertised to execut
| `spark.blacklist.application.maxFailedTasksPerExecutor` | 2 | (Experimental) How many different tasks must fail on one executor, in successful task sets, before the executor is blacklisted for the entire application. Blacklisted executors will be automatically added back to the pool of available resources after the timeout specified by `spark.blacklist.timeout`. Note that with dynamic allocation, though, the executors may get marked as idle and be reclaimed by the cluster manager. |
| `spark.blacklist.application.maxFailedExecutorsPerNode` | 2 | (Experimental) How many different executors must be blacklisted for the entire application, before the node is blacklisted for the entire application. Blacklisted nodes will be automatically added back to the pool of available resources after the timeout specified by `spark.blacklist.timeout`. Note that with dynamic allocation, though, the executors on the node may get marked as idle and be reclaimed by the cluster manager. |
| `spark.blacklist.killBlacklistedExecutors` | false | (Experimental) If set to "true", allow Spark to automatically kill, and attempt to re-create, executors when they are blacklisted. Note that, when an entire node is added to the blacklist, all of the executors on that node will be killed. |
| `spark.streaming.kafka.maxRatePerPartition` | not set | 在使用新的 Kafka direct stream API 时,从每个 kafka 分区读到的最大速率(每秒的记录数目). 详见 [Kafka Integration guide](streaming-kafka-integration.html) . |
* Java堆空间分为两个区域 Young 和 Old。Young 一代的目的是持有短命的物体,而 Old 一代的目标是使用寿命更长的物体。
* Young 一代进一步分为三个区域[ Eden , Survivor1 , Survivor2 ]。
* Young 一代进一步分为三个区域[ Eden, Survivor1, Survivor2 ]。
* 垃圾收集过程的简化说明:当 Eden 已满时, Eden 上运行了一个小型 GC,并将 Eden 和 Survivor1 中存在的对象复制到 Survivor2。幸存者地区被交换。如果一个对象足够老,或者 Survivor2 已满,则会移动到 Old。最后,当 Old 接近满时,一个完整的 GC 被调用。
* 垃圾收集过程的简化说明:当 Eden 已满时, Eden 上运行了一个小型 GC,并将 Eden 和 Survivor1 中存在的对象复制到 Survivor2。幸存者地区被交换。如果一个对象足够老,或者 Survivor2 已满,则会移动到 Old。最后,当 Old 接近满时,一个完整的 GC 被调用。
Spark 中 GC 调优的目的是确保只有长寿命的 RDD 存储在 Old 版本中,并且 Young 版本的大小足够存储短命期的对象。这将有助于避免使用完整的 GC 来收集任务执行期间创建的临时对象。可能有用的一些步骤是:
* 如果太小的集合太多,而不是很多主要的 GC ,为 Eden 分配更多的内存将会有所帮助。您可以将 Eden 的大小设置为对每个任务需要多少内存的估计。如果确定 Eden 的大小 `E`,那么您可以使用该选项设置年轻一代的大小 `-Xmn=4/3*E`。(按比例增加4/3是考虑幸存者地区使用的空间。)
* 如果太小的集合太多,而不是很多主要的 GC,为 Eden 分配更多的内存将会有所帮助。您可以将 Eden 的大小设置为对每个任务需要多少内存的估计。如果确定 Eden 的大小 `E`,那么您可以使用该选项设置年轻一代的大小 `-Xmn=4/3*E`。(按比例增加4/3是考虑幸存者地区使用的空间。)
请注意,以 _a json file_ 提供的文件不是典型的 JSON 文件. 每行必须包含一个 separate (单独的),self-contained valid (独立的有效的)JSON 对象. 有关更多信息,请参阅 [JSON Lines text format, also called newline-delimited JSON](http://jsonlines.org/)
...
...
@@ -2241,7 +2241,7 @@ otherPeople.show()
<small>Find full example code at "examples/src/main/python/sql/datasource.py" in the Spark repo.</small>
请注意,以 _a json file_ 提供的文件不是典型的 JSON 文件. 每行必须包含一个 separate (单独的),self-contained valid (独立的有效的)JSON 对象. 有关更多信息,请参阅 [JSON Lines text format, also called newline-delimited JSON](http://jsonlines.org/).