3.1.2.7 Changing Spark Log Rollover based on Time
To change Spark log rollover based on time:
- Stop Spark service:
sudo systemctl stop spark-slave.servicesudo systemctl stop spark-master.service
- Edit
spark-env.sh- Navigate to
SPARK_HOME/conf, and comment or deleteSPARK_WORKER_OPTSvariable and its value.
- Navigate to
- Edit
spark-defaults.confby adding the below lines:spark.executor.logs.rolling.maxRetainedFiles 7spark.executor.logs.rolling.strategy timespark.executor.logs.rolling.time.interval minutely
Note:
You can changespark.executor.logs.rolling.timetodaily,hourly,minutely. This is to enable log rollover based on time. - Start Spark service:
sudo systemctl start spark-master.servicesudo systemctl start spark-slave.service
You will see the application and driver data ( files and logs) under
/u02/sparkwhen you publish the pipeline again.