AbfsInputStreamStatistics, org.apache.hadoop.fs.statistics.IOStatisticsSourcepublic class AbfsInputStreamStatisticsImpl extends java.lang.Object implements AbfsInputStreamStatistics
| Constructor | Description |
|---|---|
AbfsInputStreamStatisticsImpl() |
| Modifier and Type | Method | 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.
|
java.lang.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.IOStatisticsSource@VisibleForTesting public long getSeekOperations()
@VisibleForTesting public long getForwardSeekOperations()
@VisibleForTesting public long getBackwardSeekOperations()
@VisibleForTesting public long getBytesRead()
@VisibleForTesting public long getBytesSkippedOnSeek()
@VisibleForTesting public long getBytesBackwardsOnSeek()
@VisibleForTesting public long getSeekInBuffer()
@VisibleForTesting public long getReadOperations()
@VisibleForTesting public long getBytesReadFromBuffer()
@VisibleForTesting public long getRemoteReadOperations()
@VisibleForTesting public long getReadAheadBytesRead()
@VisibleForTesting public long getRemoteBytesRead()
@VisibleForTesting public double getActionHttpGetRequest()
public java.lang.String toString()
toString in interface AbfsInputStreamStatisticstoString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.