GitHub user shaofei007 opened a pull request: https://github.com/apache/spark/pull/18718
[SPARK-21357][DStreams] FileInputDStream not remove out of date RDD ## What changes were proposed in this pull request? ```DStreams class FileInputDStream [line 162] protected[streaming] override def clearMetadata(time: Time) { batchTimeToSelectedFiles.synchronized { val oldFiles = batchTimeToSelectedFiles.filter(_._1 < (time - rememberDuration)) batchTimeToSelectedFiles --= oldFiles.keys ``` The above code does not remove the old generatedRDDs. "super.clearMetadata(time)" was added to the beginning of clearMetadata to remove the old generatedRDDs. ## How was this patch tested? At the end of clearMetadata, the testing code (print the number of generatedRDDs) was added to check the old RDDS were removed manually. You can merge this pull request into a Git repository by running: $ git pull https://github.com/shaofei007/spark master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/18718.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #18718 ---- commit bded22e93072bae51978c4a1b08fdc873ecea80c Author: Fei Shao <1427357...@qq.com> Date: 2017-07-22T12:21:27Z [SPARK-21357][DStreams] FileInputDStream not remove out of date RDD ### What changes were proposed in this pull request? ```DStreams class FileInputDStream protected[streaming] override def clearMetadata(time: Time) { batchTimeToSelectedFiles.synchronized { val oldFiles = batchTimeToSelectedFiles.filter(_._1 < (time - rememberDuration)) batchTimeToSelectedFiles --= oldFiles.keys ``` The above code does not remove the old generatedRDDs. "super.clearMetadata(time)" was added to the beginning of clearMetadata to remove the old generatedRDDs. ## How was this patch tested At the end of clearMetadata, the testing code (print the number of generatedRDDs) was added to check the old RDDS were removed. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org