-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[WIP][Not Ready for Review]Pre-req work for SegmentAssignmentStrategy (#8585) #8642
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
|
Current code is moving
Current code requires the code modification directly to |
jackjlli
left a comment
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.
I also feed that the current offline/realtime segment assignment classes should extend from the same abstract base class, and inside that base class different assignment strategy can be chosen.
| * Factory for the {@link SegmentAssignment}. | ||
| * Factory for the {@link SegmentAssignmentStrategy}. | ||
| */ | ||
| public class SegmentAssignmentFactory { |
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.
sed 's/SegmentAssignmentFactory/SegmentAssignmentStrategyFactory/'
| */ | ||
| public class OfflineSegmentAssignment implements SegmentAssignment { | ||
| private static final Logger LOGGER = LoggerFactory.getLogger(OfflineSegmentAssignment.class); | ||
| public class OfflineSegmentAssignmentStrategy implements SegmentAssignmentStrategy { |
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.
This does not seem correct to me
OfflineSegmentAssignment or RealtimeSegmentAssignment is not a strategy imo
Regardless of offline v/s realtime, replica group and balanced are the concrete implementations of strategies
cc @jasperjiaguo since you are also going to touch related code later
|
I don't see the difference of the new |
Currently, we have SegmentAssignment interface and OfflineSegmentAssignment & RealtimeSegmentAssignment as its implementation. This approach doesn't allow us to pick the custom segment assignment strategy.
This PR provides SegmentAssignmentStrategy as an interface improvement and pre-requisite work.
Issue #8585