-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: create builder for disk manager #16191
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
Conversation
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
|
Correct me if I'm wrong, but the failing test doesn't seem related. |
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
alamb
left a comment
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.
Thank you @jdrouet -- looks great to me
I do think we should deprecate DiskManagerConfig -- as described on https://datafusion.apache.org/contributor-guide/api-health.html if possible, but we can do that as a follow on PR
2010YOUY01
left a comment
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, thank you. I also think it's great to deprecating the old APIs.
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
| "Created local dirs {local_dirs:?} as DataFusion working directory" | ||
| ); | ||
| Ok(DiskManager { | ||
| local_dirs: Mutex::new(Some(local_dirs)), |
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.
Thank you @jdrouet for the work, LGTM, and minor question, do we have each dir max limit config when we have multi dirs?
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.
Actually, I just moved the existing to a builder. So right now, we have the same behavior as before, meaning that each dir has the same limit.
For more details, you'd have to go back to the current_file_disk_usage computation.
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.
Thanks , got it!
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
alamb
left a comment
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.
Thanks again @jdrouet
xudong963
left a comment
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.
Thank you, the change will match our codebase more, most of places are using Builder style
Which issue does this PR close?
DiskManagerBuilderto construct DiskManagers #15319Rationale for this change
Proposing a builder pattern for the disk managers.
What changes are included in this PR?
In order not to have a breaking change, I decided not to update the current config structure, but instead, create a builder that would be an alternative and would allow to customize the disk manager, while being easily extendible.
Are these changes tested?
It's been used in the existing tests and the CLI
Are there any user-facing changes?
Introducing a builder structure.