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.service
sudo systemctl stop spark-master.service
- Edit
spark-env.sh
- Navigate to
SPARK_HOME/conf
, and comment or deleteSPARK_WORKER_OPTS
variable and its value.
- Navigate to
- Edit
spark-defaults.conf
by adding the below lines:spark.executor.logs.rolling.maxRetainedFiles 7
spark.executor.logs.rolling.strategy time
spark.executor.logs.rolling.time.interval minutely
Note:
You can changespark.executor.logs.rolling.time
todaily
,hourly
,minutely
. This is to enable log rollover based on time. - Start Spark service:
sudo systemctl start spark-master.service
sudo systemctl start spark-slave.service
You will see the application and driver data ( files and logs) under
/u02/spark
when you publish the pipeline again.