-
Notifications
You must be signed in to change notification settings - Fork 127
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
[MRESOLVER-554] Split thread counts for up and downstream ops #489
Conversation
Basic connector new config to be able to differentiate thread counts used for upload and download. --- https://issues.apache.org/jira/browse/MRESOLVER-554
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.
All fine, just a nit.
|
||
private final boolean smartChecksums; | ||
|
||
private final boolean parallelPut; | ||
|
||
private final boolean persistedChecksums; | ||
|
||
private Executor executor; | ||
private final ConcurrentHashMap<Boolean, Executor> executors; |
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.
Just a remark. An Enum would read better than just a boolean...
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.
Enum will be more descriptive in methods calls than only simply true or false as parameter.
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 disagree here, here is why: if I add enum, it will complicate method a lot, will need to null-check it, will need to throw IAEx if not expected (default branch of switch), etc... with boolean
there is no need for null-check and can really be this or that. IF we have need to keep more than 2 executors for any reason, this can be easily extended to enum, but right now I see no point of doing 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.
with boolean there is no need for null-check and can really be this or that.
Just a remark, a Boolean
can be null
... beside that ConcurrentHashMap
does not allows null
keys...
Basic connector new config to be able to differentiate thread counts used for upload and download.
https://issues.apache.org/jira/browse/MRESOLVER-554