HDFS-6070. Cleanup use of ReadStatistics in DFSInputStream.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1576048 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c3c267af8f
commit
3826799270
|
@ -144,6 +144,8 @@ Release 2.4.0 - UNRELEASED
|
||||||
HDFS-5986. Capture the number of blocks pending deletion on namenode webUI.
|
HDFS-5986. Capture the number of blocks pending deletion on namenode webUI.
|
||||||
(cnauroth)
|
(cnauroth)
|
||||||
|
|
||||||
|
HDFS-6070. Cleanup use of ReadStatistics in DFSInputStream. (wang)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery
|
HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery
|
||||||
|
|
|
@ -659,14 +659,11 @@ implements ByteBufferReadable, CanSetDropBehind, CanSetReadahead,
|
||||||
int nRead, BlockReader blockReader) {
|
int nRead, BlockReader blockReader) {
|
||||||
if (nRead <= 0) return;
|
if (nRead <= 0) return;
|
||||||
if (blockReader.isShortCircuit()) {
|
if (blockReader.isShortCircuit()) {
|
||||||
readStatistics.totalBytesRead += nRead;
|
readStatistics.addShortCircuitBytes(nRead);
|
||||||
readStatistics.totalLocalBytesRead += nRead;
|
|
||||||
readStatistics.totalShortCircuitBytesRead += nRead;
|
|
||||||
} else if (blockReader.isLocal()) {
|
} else if (blockReader.isLocal()) {
|
||||||
readStatistics.totalBytesRead += nRead;
|
readStatistics.addLocalBytes(nRead);
|
||||||
readStatistics.totalLocalBytesRead += nRead;
|
|
||||||
} else {
|
} else {
|
||||||
readStatistics.totalBytesRead += nRead;
|
readStatistics.addRemoteBytes(nRead);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue