mynameborat commented on a change in pull request #1095: SAMZA-2264 :
Offset.default for intermediate streams
URL: https://github.com/apache/samza/pull/1095#discussion_r301253479
##########
File path: samza-core/src/main/java/org/apache/samza/execution/StreamEdge.java
##########
@@ -125,7 +126,12 @@ Config generateConfig() {
if (isIntermediate()) {
streamConfig.put(String.format(StreamConfig.IS_INTERMEDIATE_FOR_STREAM_ID(),
spec.getId()), "true");
streamConfig.put(String.format(StreamConfig.DELETE_COMMITTED_MESSAGES_FOR_STREAM_ID(),
spec.getId()), "true");
-
streamConfig.put(String.format(StreamConfig.CONSUMER_OFFSET_DEFAULT_FOR_STREAM_ID(),
spec.getId()), "oldest");
+
+ // Setting offset.default to oldest only if the job is running in batch
mode
+ if (new
ApplicationConfig(config).getAppMode().equals(ApplicationConfig.ApplicationMode.BATCH))
{
+
streamConfig.put(String.format(StreamConfig.CONSUMER_OFFSET_DEFAULT_FOR_STREAM_ID(),
spec.getId()), "oldest");
Review comment:
nit: extract spec.getId() into a local variable?
----------------------------------------------------------------
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