public class AbfsInputStreamStatisticsImpl extends Object implements AbfsInputStreamStatistics
| Constructor and Description |
|---|
AbfsInputStreamStatisticsImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
bytesRead(long bytes)
Increment the bytes read counter by the number of bytes;
no-op if the argument is negative.
|
void |
bytesReadFromBuffer(long bytes)
Record the total bytes read from buffer.
|
double |
getActionHttpGetRequest()
Getter for the mean value of the time taken to complete a HTTP GET
request by AbfsInputStream.
|
long |
getBackwardSeekOperations() |
long |
getBytesBackwardsOnSeek() |
long |
getBytesRead() |
long |
getBytesReadFromBuffer() |
long |
getBytesSkippedOnSeek() |
long |
getForwardSeekOperations() |
org.apache.hadoop.fs.statistics.IOStatistics |
getIOStatistics()
Getter for IOStatistics instance used.
|
long |
getReadAheadBytesRead() |
long |
getReadOperations() |
long |
getRemoteBytesRead() |
long |
getRemoteReadOperations() |
long |
getSeekInBuffer() |
long |
getSeekOperations() |
void |
readAheadBytesRead(long bytes)
Total bytes read from readAhead buffer during a read operation.
|
void |
readOperationStarted()
A
read(byte[] buf, int off, int len) operation has started. |
void |
remoteBytesRead(long bytes)
Total bytes read remotely after nothing was read from readAhead buffer.
|
void |
remoteReadOperation()
Records a successful remote read operation.
|
void |
seek(long seekTo,
long currentPos)
Record a forward or backward seek, adding a seek operation, a forward or
a backward seek operation, and number of bytes skipped.
|
void |
seekBackwards(long negativeOffset)
Seek backwards, incrementing the seek and backward seek counters.
|
void |
seekForwards(long skipped)
Record a forward seek, adding a seek operation, a forward
seek operation, and any bytes skipped.
|
void |
seekInBuffer()
Records the total number of seeks done in the buffer.
|
String |
toString()
String operator describes all the current statistics.
|
public void seekBackwards(long negativeOffset)
seekBackwards in interface AbfsInputStreamStatisticsnegativeOffset - how far was the seek?
This is expected to be negative.public void seekForwards(long skipped)
seekForwards in interface AbfsInputStreamStatisticsskipped - number of bytes skipped by reading from the stream.
If the seek was implemented by a close + reopen, set this to zero.public void seek(long seekTo,
long currentPos)
seek in interface AbfsInputStreamStatisticsseekTo - seek to the position.currentPos - current position.public void bytesRead(long bytes)
bytesRead in interface AbfsInputStreamStatisticsbytes - number of bytes read.public void bytesReadFromBuffer(long bytes)
bytesReadFromBuffer in interface AbfsInputStreamStatisticsbytes - number of bytes that are read from buffer.public void seekInBuffer()
seekInBuffer in interface AbfsInputStreamStatisticspublic void readOperationStarted()
read(byte[] buf, int off, int len) operation has started.readOperationStarted in interface AbfsInputStreamStatisticspublic void readAheadBytesRead(long bytes)
readAheadBytesRead in interface AbfsInputStreamStatisticsbytes - the bytes to be incremented.public void remoteBytesRead(long bytes)
remoteBytesRead in interface AbfsInputStreamStatisticsbytes - the bytes to be incremented.public void remoteReadOperation()
remoteReadOperation in interface AbfsInputStreamStatisticspublic org.apache.hadoop.fs.statistics.IOStatistics getIOStatistics()
getIOStatistics in interface AbfsInputStreamStatisticsgetIOStatistics in interface org.apache.hadoop.fs.statistics.IOStatisticsSourcepublic long getSeekOperations()
public long getForwardSeekOperations()
public long getBackwardSeekOperations()
public long getBytesRead()
public long getBytesSkippedOnSeek()
public long getBytesBackwardsOnSeek()
public long getSeekInBuffer()
public long getReadOperations()
public long getBytesReadFromBuffer()
public long getRemoteReadOperations()
public long getReadAheadBytesRead()
public long getRemoteBytesRead()
public double getActionHttpGetRequest()
public String toString()
toString in interface AbfsInputStreamStatisticstoString in class ObjectCopyright © 2008–2021 Apache Software Foundation. All rights reserved.