Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

APEXMALHAR-2305 #resolve Mirror the proto-session window behavior des…#458

Merged
asfgit merged 2 commits intoapache:masterfrom
davidyan74:APEXMALHAR-2305
Oct 19, 2016
Merged

APEXMALHAR-2305 #resolve Mirror the proto-session window behavior des…#458
asfgit merged 2 commits intoapache:masterfrom
davidyan74:APEXMALHAR-2305

Conversation

@davidyan74
Copy link
Copy Markdown
Contributor

…cribed in the streaming 102 blog

@siyuanh please review and merge

// create a new session window that covers the timestamp
long newBeginTimestamp = Math.min(sessionWindow.getBeginTimestamp(), timestamp);
long newEndTimestamp = Math.max(sessionWindow.getBeginTimestamp() + sessionWindow.getDurationMillis(), timestamp + 1);
long newEndTimestamp = Math.max(sessionWindow.getBeginTimestamp() + sessionWindow.getDurationMillis(), timestamp + minGapMillis);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally feel wrap the logic into a method like getEndTimestamp(), getProtoEndTimestamp() and extendTo(long time) would be more readable

@siyuanh
Copy link
Copy Markdown
Contributor

siyuanh commented Oct 19, 2016

Looks good, probably just reopen the PR to make travis/Jenkins happy?

@asfgit asfgit merged commit 2cf8bad into apache:master Oct 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants