dnishimura commented on a change in pull request #1027: SAMZA-2046: Startpoint 
fan out implementation
URL: https://github.com/apache/samza/pull/1027#discussion_r283565381
 
 

 ##########
 File path: 
samza-core/src/main/scala/org/apache/samza/checkpoint/OffsetManager.scala
 ##########
 @@ -517,23 +510,25 @@ class OffsetManager(
     if (startpointManager != null) {
       info("Starting startpoint manager.")
       startpointManager.start
-      val taskNameToSSPs: Map[TaskName, Set[SystemStreamPartition]] = 
systemStreamPartitions
 
-      taskNameToSSPs.foreach {
+      systemStreamPartitions.foreach {
         case (taskName, systemStreamPartitionSet) => {
-          val sspToStartpoint = systemStreamPartitionSet
-            .map(ssp => (ssp, startpointManager.readStartpoint(ssp, taskName)))
-            .filter(_._2 != null)
-            .toMap
-
-          if (!sspToStartpoint.isEmpty) {
-            startpoints += taskName -> sspToStartpoint
+          Option(startpointManager.getFanOutForTask(taskName)) match {
+            case Some(fanOut) => {
+              val filteredFanOut = fanOut.asScala
+                .filter(f => systemStreamPartitionSet.contains(f._1))
+                .toMap
+              if (!filteredFanOut.isEmpty) {
+                startpoints += taskName -> filteredFanOut
 
 Review comment:
   Only when creating the fan outs. Will add a log line here.

----------------------------------------------------------------
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

Reply via email to