Package org.apache.hadoop.hdfs
Class ReadStatistics
java.lang.Object
org.apache.hadoop.hdfs.ReadStatistics
A utility class that maintains statistics for reading.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddErasureCodingDecodingTime(long millis) voidaddLocalBytes(long amt) voidaddRemoteBytes(long amt) voidaddShortCircuitBytes(long amt) voidaddZeroCopyBytes(long amt) voidclear()longlonglongReturn the total time in milliseconds used for erasure coding decoding.longlonglong
-
Constructor Details
-
ReadStatistics
public ReadStatistics() -
ReadStatistics
-
-
Method Details
-
getTotalBytesRead
public long getTotalBytesRead()- Returns:
- The total bytes read. This will always be at least as high as the other numbers, since it includes all of them.
-
getTotalLocalBytesRead
public long getTotalLocalBytesRead()- Returns:
- The total local bytes read. This will always be at least as high as totalShortCircuitBytesRead, since all short-circuit reads are also local.
-
getTotalShortCircuitBytesRead
public long getTotalShortCircuitBytesRead()- Returns:
- The total short-circuit local bytes read.
-
getTotalZeroCopyBytesRead
public long getTotalZeroCopyBytesRead()- Returns:
- The total number of zero-copy bytes read.
-
getRemoteBytesRead
public long getRemoteBytesRead()- Returns:
- The total number of bytes read which were not local.
-
getBlockType
- Returns:
- block type of the input stream. If block type != CONTIGUOUS, it is reading erasure coded data.
-
getTotalEcDecodingTimeMillis
public long getTotalEcDecodingTimeMillis()Return the total time in milliseconds used for erasure coding decoding. -
addRemoteBytes
public void addRemoteBytes(long amt) -
addLocalBytes
public void addLocalBytes(long amt) -
addShortCircuitBytes
public void addShortCircuitBytes(long amt) -
addZeroCopyBytes
public void addZeroCopyBytes(long amt) -
addErasureCodingDecodingTime
public void addErasureCodingDecodingTime(long millis) -
clear
public void clear()
-