-
Notifications
You must be signed in to change notification settings - Fork 234
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
[YUNIKORN-1709] Add event streaming logic #533
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #533 +/- ##
==========================================
+ Coverage 78.01% 78.19% +0.17%
==========================================
Files 82 83 +1
Lines 13378 13559 +181
==========================================
+ Hits 10437 10602 +165
- Misses 2615 2630 +15
- Partials 326 327 +1 ☔ View full report in Codecov by Sentry. |
854fad6
to
94dedb4
Compare
f750b87
to
af2b4e0
Compare
d95930a
to
8633a35
Compare
a50058e
to
535b6f5
Compare
Note: any timeout for the HTTP server can break the streaming (WriteTimeout for HTTP 1.1, ReadTimeout and IdleTimeout for HTTP 2.0). We either start a new server instance for the streaming or explicitly comment (or even test) that timeouts must not be used. |
1cd63b8
to
090ba34
Compare
431c6ee
to
b9e11cd
Compare
b9e11cd
to
a3b132c
Compare
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.
LGTM Left final minor comments!
ping @wilfred-s |
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.
minor changes to comments on exported functions can be fixed during the commit also
consumer chan *si.EventRecord, | ||
stop chan struct{}, | ||
name string, | ||
count uint64) { |
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 parameter is unused. Is it a potential bug or we can just remove it?
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.
Need a follow up jira to clean that up @pbacsko
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.
Correct. I actually have a list of necessary small code changes which are unrelated to each other, I'm adding this to the list.
What is this PR for?
Core implementation of event streaming. Clients are updated real time on the REST interface. A persistent HTTP connection is maintained for them.
Consumers can request a new stream and receive core scheduler events immediately on a read-only channel. Slow consumers are detected by checking the number of elements in the channel buffer. If the channel buffer on the local side is full, we remove the consumer.
Explicit closure of the event stream is possible and consumers are expected to do it.
What type of PR is it?
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-1709
How should this be tested?
Screenshots (if appropriate)
Questions: