public static final class FileSystem.Statistics
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
FileSystem.Statistics.StatisticsData |
Statistics data.
|
| Constructor | Description |
|---|---|
Statistics(java.lang.String scheme) |
|
Statistics(FileSystem.Statistics other) |
Copy constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
long |
getBytesRead() |
Get the total number of bytes read.
|
long |
getBytesReadByDistance(int distance) |
In the common network topology setup, distance value should be an even
number such as 0, 2, 4, 6.
|
long |
getBytesReadErasureCoded() |
Get the total number of bytes read on erasure-coded files.
|
long |
getBytesWritten() |
Get the total number of bytes written.
|
FileSystem.Statistics.StatisticsData |
getData() |
Get all statistics data.
|
int |
getLargeReadOps() |
Get the number of large file system read operations such as list files
under a large directory.
|
int |
getReadOps() |
Get the number of file system read operations such as list files.
|
long |
getRemoteReadTime() |
Get total time taken in ms for bytes read from remote.
|
java.lang.String |
getScheme() |
Get the uri scheme associated with this statistics object.
|
FileSystem.Statistics.StatisticsData |
getThreadStatistics() |
Get or create the thread-local data associated with the current thread.
|
int |
getWriteOps() |
Get the number of file system write operations such as create, append
rename etc.
|
void |
increaseRemoteReadTime(long durationMS) |
Increment the time taken to read bytes from remote in the statistics.
|
void |
incrementBytesRead(long newBytes) |
Increment the bytes read in the statistics.
|
void |
incrementBytesReadByDistance(int distance,
long newBytes) |
Increment the bytes read by the network distance in the statistics
In the common network topology setup, distance value should be an even
number such as 0, 2, 4, 6.
|
void |
incrementBytesReadErasureCoded(long newBytes) |
Increment the bytes read on erasure-coded files in the statistics.
|
void |
incrementBytesWritten(long newBytes) |
Increment the bytes written in the statistics.
|
void |
incrementLargeReadOps(int count) |
Increment the number of large read operations.
|
void |
incrementReadOps(int count) |
Increment the number of read operations.
|
void |
incrementWriteOps(int count) |
Increment the number of write operations.
|
void |
reset() |
Resets all statistics to 0.
|
java.lang.String |
toString() |
public Statistics(java.lang.String scheme)
public Statistics(FileSystem.Statistics other)
other - The input Statistics object which is cloned.public FileSystem.Statistics.StatisticsData getThreadStatistics()
public void incrementBytesRead(long newBytes)
newBytes - the additional bytes readpublic void incrementBytesWritten(long newBytes)
newBytes - the additional bytes writtenpublic void incrementReadOps(int count)
count - number of read operationspublic void incrementLargeReadOps(int count)
count - number of large read operationspublic void incrementWriteOps(int count)
count - number of write operationspublic void incrementBytesReadErasureCoded(long newBytes)
newBytes - the additional bytes readpublic void incrementBytesReadByDistance(int distance,
long newBytes)
distance - the network distancenewBytes - the additional bytes readpublic void increaseRemoteReadTime(long durationMS)
durationMS - time taken in ms to read bytes from remotepublic long getBytesRead()
public long getBytesWritten()
public int getReadOps()
public int getLargeReadOps()
public int getWriteOps()
public long getBytesReadByDistance(int distance)
distance - the network distancepublic long getBytesReadErasureCoded()
public long getRemoteReadTime()
public FileSystem.Statistics.StatisticsData getData()
public java.lang.String toString()
toString in class java.lang.Objectpublic void reset()
public java.lang.String getScheme()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.