List of usage examples for org.apache.hadoop.hdfs ReadStatistics addLocalBytes
public synchronized void addLocalBytes(long amt)
From source file:com.mellanox.r4h.DFSInputStream.java
License:Apache License
private void updateReadStatistics(ReadStatistics readStatistics, int nRead, BlockReader blockReader) { if (nRead <= 0) return;/*from w ww . ja v a2s. c o m*/ synchronized (infoLock) { if (blockReader.isShortCircuit()) { readStatistics.addShortCircuitBytes(nRead); } else if (blockReader.isLocal()) { readStatistics.addLocalBytes(nRead); } else { readStatistics.addRemoteBytes(nRead); } } }