Example usage for org.apache.hadoop.hdfs ReadStatistics addRemoteBytes

List of usage examples for org.apache.hadoop.hdfs ReadStatistics addRemoteBytes

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs ReadStatistics addRemoteBytes.

Prototype

public synchronized void addRemoteBytes(long amt) 

Source Link

Usage

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. j  av a2  s .  co  m*/
    synchronized (infoLock) {
        if (blockReader.isShortCircuit()) {
            readStatistics.addShortCircuitBytes(nRead);
        } else if (blockReader.isLocal()) {
            readStatistics.addLocalBytes(nRead);
        } else {
            readStatistics.addRemoteBytes(nRead);
        }
    }
}