Set configuration "spark.history.retainedApplications" be effective

When setting  "spark.history.retainedApplications=1", the historyserver web  retains more than one application.