There are very old files under /spark2-history and because of this spark2 web ui is getting stuck on loading history , I have gone thorough some of the documentations where it is mentioned setting below property will solve the issue .Please find below property :
spark.history.fs.cleaner.enabled
spark.history.fs.cleaner.maxAge
spark.history.fs.cleaner.interval
would these property be same for the spark2 as well ? also I do not see these property already existing , and in spark docs default property is mentioned there .
https://spark.apache.org/docs/latest/monitoring.html