HDFS-17426. Remove Invalid FileSystemECReadStats logic in DFSInputStream (#6628)

This commit is contained in:
huhaiyang 2024-03-21 10:33:41 +08:00 committed by GitHub
parent a957cd5049
commit 77c600d769
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,7 +63,6 @@
import org.apache.hadoop.hdfs.DFSUtilClient.CorruptedBlocks; import org.apache.hadoop.hdfs.DFSUtilClient.CorruptedBlocks;
import org.apache.hadoop.hdfs.client.impl.BlockReaderFactory; import org.apache.hadoop.hdfs.client.impl.BlockReaderFactory;
import org.apache.hadoop.hdfs.client.impl.DfsClientConf; import org.apache.hadoop.hdfs.client.impl.DfsClientConf;
import org.apache.hadoop.hdfs.protocol.BlockType;
import org.apache.hadoop.hdfs.protocol.ClientDatanodeProtocol; import org.apache.hadoop.hdfs.protocol.ClientDatanodeProtocol;
import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
import org.apache.hadoop.hdfs.protocol.DatanodeInfoWithStorage; import org.apache.hadoop.hdfs.protocol.DatanodeInfoWithStorage;
@ -897,9 +896,6 @@ protected synchronized int readWithStrategy(ReaderStrategy strategy)
updateReadStatistics(readStatistics, result, blockReader); updateReadStatistics(readStatistics, result, blockReader);
dfsClient.updateFileSystemReadStats(blockReader.getNetworkDistance(), dfsClient.updateFileSystemReadStats(blockReader.getNetworkDistance(),
result, readTimeMS); result, readTimeMS);
if (readStatistics.getBlockType() == BlockType.STRIPED) {
dfsClient.updateFileSystemECReadStats(result);
}
return result; return result;
} catch (ChecksumException ce) { } catch (ChecksumException ce) {
throw ce; throw ce;
@ -1238,9 +1234,6 @@ void actualGetFromOneDataNode(final DNAddrPair datanode, final long startInBlk,
IOUtilsClient.updateReadStatistics(readStatistics, nread, reader); IOUtilsClient.updateReadStatistics(readStatistics, nread, reader);
dfsClient.updateFileSystemReadStats( dfsClient.updateFileSystemReadStats(
reader.getNetworkDistance(), nread, readTimeMS); reader.getNetworkDistance(), nread, readTimeMS);
if (readStatistics.getBlockType() == BlockType.STRIPED) {
dfsClient.updateFileSystemECReadStats(nread);
}
if (nread != len) { if (nread != len) {
throw new IOException("truncated return from reader.read(): " + throw new IOException("truncated return from reader.read(): " +
"excpected " + len + ", got " + nread); "excpected " + len + ", got " + nread);