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

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

Introduction

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

Prototype

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