-
-
Notifications
You must be signed in to change notification settings - Fork 748
Refactor SchedulerState from Scheduler
#4365
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
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
6dbb36f
Move `worker_send` into transition functions
jakirkham 1bf1faa
Refactor `_task_to_msg` from `send_task_to_worker`
jakirkham 9f44f06
Move `report` out of `_add_to_memory`
jakirkham 68cf243
Refactor out `_client_releases_keys`
jakirkham 3c9d3ac
Collect client recs in `_add_to_memory`
jakirkham 1332985
Use `_client_releases_keys` in transitions
jakirkham fe31d61
Refactor out `_task_to_report_msg`
jakirkham 6b533a1
Collect and send worker messages from transitions
jakirkham 2abe46c
Handle `report` in `transition`
jakirkham bc13fbe
Add method to send a message to a specific client
jakirkham 0138c53
Add `_task_to_client_msgs`
jakirkham b0ffcf2
Replace `report_msg` with `client_msgs`
jakirkham fe33d4a
Create empty `SchedulerState` class
jakirkham 5960577
Move `transition*` methods into `SchedulerState`
jakirkham 3a02cea
Add attributes for `SchedulerState`
jakirkham ac4fe97
Initialize attributes in `SchedulerState`
jakirkham f39caef
Pass arguments to `super` class
jakirkham 6379cd1
Use `SchedulerState` attributes
jakirkham 980fd67
Use `cast` to access parent class attributes
jakirkham 8dc806d
Drop no longer needed `cast`s & local assignments
jakirkham f3b07f2
Use `dict` views onto `SortedDict` where possible
jakirkham 38c1c35
Add `@property`s for `SchedulerState` attributes
jakirkham 8fe8388
Take `worker_msgs` arg in `_propagate_forgotten`
jakirkham 7b5dec3
Use `parent` for private methods
jakirkham 8a9a1de
Annotate function arguments and return types
jakirkham 2114ea8
Use `cfunc` on private `SchedulerState` methods
jakirkham 096b661
Decorate `SchedulerState` methods with `@ccall`
jakirkham bbf156c
Add optional args to `transition_waiting_memory`
jakirkham 5fdc871
Drop `**kwargs` from `_add_to_memory`
jakirkham 2c76c6a
Use `cfunc` to decorate `_add_to_memory`
jakirkham 7fb5228
Make `SchedulerState` private methods functions
jakirkham c7f2078
Collect `@property`s in `__pdict__`
jakirkham 2212edc
Use `__pdict__` with `__dict__` in dashboard
jakirkham cd99140
Merge dask/master into jakirkham/ref_trans2
jakirkham 460f12f
Merge dask/master into jakirkham/ref_trans2
jakirkham bef5240
Refactor `consume_resources` & `release_resources`
jakirkham caf3c1a
Refactor `aliases` into `SchedulerState`
jakirkham ab5beca
Refactor `coerce_hostname` into `SchedulerState`
jakirkham f93ecad
Refactor `task_metadata` into `SchedulerState`
jakirkham 9275830
Refactor `remove_key` into `SchedulerState`
jakirkham 19174d2
Merge dask/master into jakirkham/ref_trans2
jakirkham a2f00e2
Merge dask/master into jakirkham/ref_trans2
jakirkham db04403
Merge dask/master into jakirkham/ref_trans2
jakirkham 4c0720e
Merge dask/master into jakirkham/ref_trans2
jakirkham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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 am a bit confused, why do we need
kwargs? And call to super?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.
Yeah that's fair. It's a little confusing.
The call to
superis needed to call the parent constructors ofScheduler. These areServerNodeandSchedulerState. We also want to affect when these get called relative to other things in this constructor (as this constructor needs some of the attributes of the parent classes to be setup in later steps).As
Schedulerinherits from two base classes, we need to make sure that arguments for those constructors get passed through and picked up by the right parent class. There are some more details in this SO answer that may help clarify this further.