ayushtkn commented on code in PR #6227:
URL: https://github.com/apache/hadoop/pull/6227#discussion_r1411597652
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml:
##########
@@ -6525,6 +6525,21 @@
If the namespace is DEFAULT, it's best to change this conf to other
value.
</description>
</property>
+ <property>
+ <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.
Review Comment:
The mean time in milliseconds which is used to compute client congestion
backoff sleep time.
##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java:
##########
@@ -564,6 +564,34 @@ private DataStreamer(HdfsFileStatus stat, ExtendedBlock
block,
this.addBlockFlags = flags;
this.maxPipelineRecoveryRetries = conf.getMaxPipelineRecoveryRetries();
this.markSlowNodeAsBadNodeThreshold =
conf.getMarkSlowNodeAsBadNodeThreshold();
+ congestionBackOffMeanTimeInMs = dfsClient.getConfiguration().getInt(
+ HdfsClientConfigKeys.DFS_CLIENT_CONGESTION_BACKOFF_MEAN_TIME,
+ HdfsClientConfigKeys.DFS_CLIENT_CONGESTION_BACKOFF_MEAN_TIME_DEFAULT);
+ congestionBackOffMaxTimeInMs = dfsClient.getConfiguration().getInt(
+ HdfsClientConfigKeys.DFS_CLIENT_CONGESTION_BACKOFF_MAX_TIME,
+ HdfsClientConfigKeys.DFS_CLIENT_CONGESTION_BACKOFF_MAX_TIME_DEFAULT);
+ if (congestionBackOffMeanTimeInMs <= 0 || congestionBackOffMaxTimeInMs <=
0 ||
+ congestionBackOffMaxTimeInMs < congestionBackOffMeanTimeInMs) {
Review Comment:
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
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml:
##########
@@ -6525,6 +6525,21 @@
If the namespace is DEFAULT, it's best to change this conf to other
value.
</description>
</property>
+ <property>
+ <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.
+ </description>
+ </property>
+ <property>
+ <name>dfs.client.congestion.backoff.max.time</name>
+ <value>50000</value>
+ <description>
+ The max milliseconds which is used to
Review Comment:
The max time in milliseconds which is used to restrict the upper limit
backoff sleep time for client.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]