bkonold commented on a change in pull request #1260: SAMZA-2446: Invoke
onCheckpoint only for registered SSPs
URL: https://github.com/apache/samza/pull/1260#discussion_r371580808
##########
File path:
samza-core/src/main/scala/org/apache/samza/checkpoint/OffsetManager.scala
##########
@@ -353,13 +353,16 @@ class OffsetManager(
}
}
- // invoke checkpoint listeners
- checkpoint.getOffsets.asScala.groupBy { case (ssp, _) => ssp.getSystem
}.foreach {
- case (systemName:String, offsets: Map[SystemStreamPartition, String])
=> {
- // Option is empty if there is no checkpointListener for this
systemName
-
checkpointListeners.get(systemName).foreach(_.onCheckpoint(offsets.asJava))
+ // invoke checkpoint listeners only for SSPs that are registered with
the OffsetManager
+ val registeredSSPs = systemStreamPartitions.getOrElse(taskName,
immutable.Set[SystemStreamPartition]())
Review comment:
We need to indicate the type somewhere or the compiler throws up. E.g.
`val registeredSSPs = systemStreamPartitions.getOrElse(taskName,
Set[SystemStreamPartition]()`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services