Skip to content
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

Optimize sliding window late data insertion with skip list #245

Open
yunfengzhou-hub opened this issue Sep 18, 2023 · 0 comments
Open

Optimize sliding window late data insertion with skip list #245

yunfengzhou-hub opened this issue Sep 18, 2023 · 0 comments
Labels
type:improvement improvement to existing functionality

Comments

@yunfengzhou-hub
Copy link
Collaborator

SlidingWindowKeyedProcessFunction.java:

                if (timestamps.isEmpty() || timestamps.get(timestamps.size() - 1) < timestamp) {
                    timestampList.add(timestamp);
                } else {
                    // TODO: Use skip list to optimize the performance of inserting late data.
                    for (int insertionIdx = 0; insertionIdx < timestamps.size(); insertionIdx++) {
                        if (timestamps.get(insertionIdx) < timestamp) {
                            continue;
                        }
                        timestamps.add(insertionIdx, timestamp);
                        break;
                    }
                    timestampList.update(timestamps);
                }
@yunfengzhou-hub yunfengzhou-hub added priority:major type:improvement improvement to existing functionality and removed priority:major labels Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:improvement improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant