DriverLogger¶
DriverLogger
runs on the driver (in client
deploy mode) to copy driver logs to Hadoop DFS periodically.
Creating Instance¶
DriverLogger
takes the following to be created:
DriverLogger
is created using apply utility.
Creating DriverLogger¶
apply(
conf: SparkConf): Option[DriverLogger]
apply
creates a DriverLogger when the following hold:
- spark.driver.log.persistToDfs.enabled configuration property is enabled
- The Spark application runs in
client
deploy mode (and spark.submit.deployMode isclient
) - spark.driver.log.dfsDir is specified
apply
prints out the following WARN message to the logs with no spark.driver.log.dfsDir specified:
Driver logs are not persisted because spark.driver.log.dfsDir is not configured
apply
is used when:
SparkContext
is created
Starting DfsAsyncWriter¶
startSync(
hadoopConf: Configuration): Unit
startSync
creates and starts a DfsAsyncWriter
(with the spark.app.id configuration property).
startSync
is used when:
SparkContext
is requested to postApplicationStart