add the case when Spark app is restart