Skip to content

Commit dc1de9f

Browse files
committed
HDFS-17806. Increase dfs.checksum.ec.socket-timeout
1 parent 3e54ecc commit dc1de9f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/FileChecksumHelper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,9 @@ static class StripedFileNonStripedChecksumComputer
613613

614614
@Override
615615
void checksumBlocks() throws IOException {
616-
int tmpTimeout = getClient().getConf().getChecksumEcSocketTimeout() * 1 +
617-
getClient().getConf().getSocketTimeout();
616+
int tmpTimeout =
617+
getClient().getConf().getChecksumEcSocketTimeout() * ecPolicy.getNumDataUnits()
618+
+ getClient().getConf().getSocketTimeout();
618619
setTimeout(tmpTimeout);
619620

620621
for (bgIdx = 0;

hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public interface HdfsClientConfigKeys {
136136
String DFS_CHECKSUM_COMBINE_MODE_KEY = "dfs.checksum.combine.mode";
137137
String DFS_CHECKSUM_COMBINE_MODE_DEFAULT = "MD5MD5CRC";
138138
String DFS_CHECKSUM_EC_SOCKET_TIMEOUT_KEY = "dfs.checksum.ec.socket-timeout";
139-
int DFS_CHECKSUM_EC_SOCKET_TIMEOUT_DEFAULT = 3000;
139+
int DFS_CHECKSUM_EC_SOCKET_TIMEOUT_DEFAULT = 30000;
140140
String DFS_DATANODE_SOCKET_WRITE_TIMEOUT_KEY =
141141
"dfs.datanode.socket.write.timeout";
142142
String DFS_CLIENT_DOMAIN_SOCKET_DATA_TRAFFIC =

hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4465,7 +4465,7 @@
44654465

44664466
<property>
44674467
<name>dfs.checksum.ec.socket-timeout</name>
4468-
<value>3000</value>
4468+
<value>30000</value>
44694469
<description>
44704470
Default timeout value in milliseconds for computing the checksum of striped blocks.
44714471
Recommended to set the same value between client and DNs in a cluster because mismatching

0 commit comments

Comments
 (0)