bkonold commented on a change in pull request #1385:
URL: https://github.com/apache/samza/pull/1385#discussion_r456765311
##########
File path:
samza-core/src/main/java/org/apache/samza/storage/TaskSideInputHandler.java
##########
@@ -119,6 +125,28 @@ public void init() {
this.startingOffsets = getStartingOffsets(fileOffsets, getOldestOffsets());
LOG.info("Starting offsets for the task {}: {}", taskName,
startingOffsets);
+
+ this.sspOffsetsToBlockUntil = getOffsetsToBlockUntil();
+ LOG.info("Task {} will catch up to offsets {}", this.taskName,
this.sspOffsetsToBlockUntil);
+
+ this.startingOffsets.forEach((ssp, offset) -> checkCaughtUp(ssp, offset,
true));
+ }
+
+ /**
+ * Retrieves the newest offset for each SSP
+ *
+ * @return a map of SSP to newest offset
+ */
+ private Map<SystemStreamPartition, String> getOffsetsToBlockUntil() {
+ Map<SystemStreamPartition, String> offsetsToBlockUntil = new HashMap<>();
+ for (SystemStreamPartition ssp : this.sspToStores.keySet()) {
+ SystemStreamMetadata metadata =
this.streamMetadataCache.getSystemStreamMetadata(ssp.getSystemStream(), false);
Review comment:
Fine suggestion, I'll modify this.
----------------------------------------------------------------
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]