-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-17242. Make congestion backoff time configurable. #6227
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
💔 -1 overall
This message was automatically generated. |
@ayushtkn @Hexiaoqiao Hi, sir. Could you please help me review this PR when you have free time? Thanks a lot! |
💔 -1 overall
This message was automatically generated. |
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.
shouldn't there be an entry in the hdfs-default.xml
as well?
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java
Outdated
Show resolved
Hide resolved
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java
Outdated
Show resolved
Hide resolved
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java
Outdated
Show resolved
Hide resolved
|
💔 -1 overall
This message was automatically generated. |
1879a20
to
6fdcaee
Compare
💔 -1 overall
This message was automatically generated. |
...ect/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
Outdated
Show resolved
Hide resolved
9dd1e2a
to
cdd90fe
Compare
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
The failed UT was passed in my local. |
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.
@ayushtkn Hi, Sir. Have fixed some problems. Could you please review this pr again when you have free time? Thanks a lot. |
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 comments, rest LGTM
if (congestionBackOffMeanTimeInMs <= 0 || congestionBackOffMaxTimeInMs <= 0 || | ||
congestionBackOffMaxTimeInMs < congestionBackOffMeanTimeInMs) { |
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 don't think we need to have a redundant wrapping if condition, we can directly go to if statements & change to defaults post checking the condition in the same if block
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.
Sorry, sir. I can not get you here. Do you mean remove if (congestionBackOffMeanTimeInMs <= 0)
and LOG.warn
right?
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 mean no need to have parent if check
if (congestionBackOffMeanTimeInMs <= 0 || congestionBackOffMaxTimeInMs <= 0 ||
congestionBackOffMaxTimeInMs < congestionBackOffMeanTimeInMs) {
We can have all three individual if checks
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.
Got it. Have fixed it. Thanks a lot Sir.
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 looks a bit weird to me. Isn't the following cleaner?
if (meanTime <= 0) {
log.WARN("mean time invalid. use default");
meanTime = meanTimeDefault;
}
if (maxTime <= 0) {
log.WARN("max time invalid. use default");
maxTime = maxTimeDefault;
}
if (meanTime > maxTime) {
log.WARN("mean/max time invalid. use default for both");
meanTime = meanTimeDefault;
maxTime = maxTimeDefault;
}
<name>dfs.client.congestion.backoff.mean.time</name> | ||
<value>5000</value> | ||
<description> | ||
The mean milliseconds which is used to compute client congestion backoff sleep time. |
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 mean time in milliseconds which is used to compute client congestion backoff sleep time.
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 sir, have fixed.
<name>dfs.client.congestion.backoff.max.time</name> | ||
<value>50000</value> | ||
<description> | ||
The max milliseconds which is used to |
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 max time in milliseconds which is used to restrict the upper limit backoff sleep time for client.
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 sir, have fixed.
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@ayushtkn Sir, could you please help me push this PR forward? Thanks a lot. |
138ace4
to
efefa15
Compare
💔 -1 overall
This message was automatically generated. |
Thanks @hfutatzhanghb for your contribution! Thanks @ayushtkn and @xinglin for the review! |
Reviewed-by: Xing Lin <xinglin@linkedin.com> Reviewed-by: Ayush Saxena <ayushsaxena@apache.org> Signed-off-by: Tao Li <tomscut@apache.org>
Description of PR
Currently,if we enable congestion backoff, we will actually invoke backOffIfNecessary method. and the backoff time is computed using CONGESTION_BACKOFF_MEAN_TIME_IN_MS and CONGESTION_BACK_OFF_MAX_TIME_IN_MS which are hard-code. We should better make them configurable to compute backoff sleep time flexibly.