dnishimura commented on a change in pull request #1027: SAMZA-2046: Startpoint
fan out implementation
URL: https://github.com/apache/samza/pull/1027#discussion_r283565560
##########
File path:
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala
##########
@@ -138,33 +142,35 @@ class TestOffsetManager {
val config = new MapConfig
val checkpointManager = getCheckpointManager(systemStreamPartition,
taskName)
val startpointManager = getStartpointManager()
+ startpointManager.start
val systemAdmins = mock(classOf[SystemAdmins])
when(systemAdmins.getSystemAdmin("test-system")).thenReturn(getSystemAdmin)
val offsetManager = OffsetManager(systemStreamMetadata, config,
checkpointManager, getStartpointManager(), systemAdmins, Map(), new
OffsetManagerMetrics)
offsetManager.register(taskName, Set(systemStreamPartition))
// Pre-populate startpoint
startpointManager.writeStartpoint(systemStreamPartition, taskName, new
StartpointOldest)
+ startpointManager.fanOut(asTaskToSSPMap(taskName, systemStreamPartition))
offsetManager.start
// Should get offset 45 back from the checkpoint manager, which is last
processed, and system admin should return 46 as starting offset.
- assertNotNull(startpointManager.readStartpoint(systemStreamPartition,
taskName))
+ assertEquals(1, startpointManager.getFanOutForTask(taskName).size())
Review comment:
Not necessary. Will remove.
----------------------------------------------------------------
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