Date format with hiphen in config has an extra y or m or d like yyyy-mmm-dd and if the hdfs path has yyyy-mm-dd directory path then wrong list fo files gets deleted. similarly if the dateFormat is yyyymmdd and if the hdfs path format is is yyyy-MM-dd still wrong file get deleted. If Date validation needs to be strong else wrong data will be deleted.
Date format with hiphen in config has an extra y or m or d like yyyy-mmm-dd and if the hdfs path has yyyy-mm-dd directory path then wrong list fo files gets deleted. similarly if the dateFormat is yyyymmdd and if the hdfs path format is is yyyy-MM-dd still wrong file get deleted. If Date validation needs to be strong else wrong data will be deleted.