Github user huaxingao commented on a diff in the pull request: https://github.com/apache/spark/pull/11250#discussion_r53563513 --- Diff: streaming/src/main/scala/org/apache/spark/streaming/dstream/FileInputDStream.scala --- @@ -163,8 +166,11 @@ class FileInputDStream[K, V, F <: NewInputFormat[K, V]]( /** Clear the old time-to-files mappings along with old RDDs */ protected[streaming] override def clearMetadata(time: Time) { super.clearMetadata(time) - val oldFiles = batchTimeToSelectedFiles.filter(_._1 < (time - rememberDuration)) - batchTimeToSelectedFiles --= oldFiles.keys + val oldFiles = batchTimeToSelectedFiles.synchronized + { + batchTimeToSelectedFiles.filter(_._1 < (time - rememberDuration)) --- End diff -- @srowen Thank you very much for your comments. I changed the code to synchronize the whole block. The extra parentheses at line 153 seems to be required. Removing it causes problem.
--- 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