-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[New Scheduler] Add container counter #5072
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
[New Scheduler] Add container counter #5072
Conversation
Get container count from ETCD when related data get updated in ETCD
| private var waitingForCountKeys = Set.empty[String] | ||
|
|
||
| override def receive: Receive = { | ||
| case operation: WatchEndpointOperation if operation.isPrefix => |
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.
to avoid updating existingContainerNumByNamespace/inProgressContainerNumByNamespace in multi threads, it will only query and update existingContainerNumByNamespace/inProgressContainerNumByNamespace at one time, during querying and updating, incoming watch events will wait in a set
| ec: ExecutionContext, | ||
| logging: Logging): ContainerCounter = { | ||
| instances | ||
| .getOrElseUpdate(namespace, new ContainerCounter(namespace, etcdClient, watcherService)) |
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.
the Counter are shared among queues which under same namespace, to reduce the query burden against etcd
Codecov Report
@@ Coverage Diff @@
## master #5072 +/- ##
==========================================
- Coverage 81.81% 75.04% -6.78%
==========================================
Files 204 205 +1
Lines 9950 9988 +38
Branches 447 453 +6
==========================================
- Hits 8141 7495 -646
- Misses 1809 2493 +684
Continue to review full report at Codecov.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5072 +/- ##
==========================================
- Coverage 82.10% 75.36% -6.75%
==========================================
Files 211 212 +1
Lines 10215 10253 +38
Branches 450 456 +6
==========================================
- Hits 8387 7727 -660
- Misses 1828 2526 +698 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Get container count from ETCD when related data get updated in ETCD
Description
It watchs ETCD data changes using
WatcherServiceimplemented in #5069, when any new container data under specified namespace is inserted/removed to/from ETCD, it will get count of containers for the namespace by querying ETCDRelated issue and scope
My changes affect the following components
Types of changes
Checklist: