-
Notifications
You must be signed in to change notification settings - Fork 331
SAMZA-1495: Set intermediate streams as higher priority by default #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @vjagadish1989 @xinyuiscool for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved. added couple of questions from my review! Thanks.
| if (isIntermediate()) { | ||
| config.put(String.format(StreamConfig.IS_INTERMEDIATE_FOR_STREAM_ID(), spec.getId()), "true"); | ||
| config.put(String.format(StreamConfig.CONSUMER_OFFSET_DEFAULT_FOR_STREAM_ID(), spec.getId()), "oldest"); | ||
| config.put(String.format(StreamConfig.PRIORITY_FOR_STREAM_ID(), spec.getId()), "1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a user already has prioritized streams, would this put the intermediate stream at the same priority as their input?. Alternately, You could set to INT_MAX here to avoid conflicting with configured priorities?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, will change to INT_MAX
| if (isIntermediate()) { | ||
| config.put(String.format(StreamConfig.IS_INTERMEDIATE_FOR_STREAM_ID(), spec.getId()), "true"); | ||
| config.put(String.format(StreamConfig.CONSUMER_OFFSET_DEFAULT_FOR_STREAM_ID(), spec.getId()), "oldest"); | ||
| config.put(String.format(StreamConfig.PRIORITY_FOR_STREAM_ID(), spec.getId()), "1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding an assert to https://github.com/apache/samza/blob/master/samza-core/src/test/java/org/apache/samza/execution/TestStreamEdge.java as well if possible?
Most changes in StreamConfig are formatting fixes. Author: Prateek Maheshwari <pmaheshw@linkedin.com> Reviewers: Jagadish Venkatraman <vjagadish1989@gmail.com> Closes apache#358 from prateekm/intermediate-stream-priority
Most changes in StreamConfig are formatting fixes.