Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/4964#discussion_r26530680
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/scheduler/JobGenerator.scala
---
@@ -156,14 +165,21 @@ class JobGenerator(jobScheduler: JobScheduler)
extends Logging {
/**
* Callback called when a batch has been completely processed.
*/
- def onBatchCompletion(time: Time) {
+ def onBatchCompletion(time: Time): Unit = synchronized {
+ // Update the lastCompletedBatch only if this batch is actually newer
than the previously
+ // completed ones.
eventActor ! ClearMetadata(time)
}
/**
* Callback called when the checkpoint of a batch has been written.
*/
- def onCheckpointCompletion(time: Time) {
+ def onCheckpointCompletion(time: Time): Unit = synchronized {
--- End diff --
Again no need of synchronized.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]