You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStreamStatistics.java
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,18 @@ public interface AbfsInputStreamStatistics {
84
84
*/
85
85
voidremoteReadOperation();
86
86
87
+
/**
88
+
* Records the bytes read from readAhead buffer.
89
+
* @param bytes the bytes to be incremented.
90
+
*/
91
+
voidreadAheadBytesRead(longbytes);
92
+
93
+
/**
94
+
* Records bytes read remotely after nothing from readAheadBuffer was read.
95
+
* @param bytes the bytes to be incremented.
96
+
*/
97
+
voidremoteBytesRead(longbytes);
98
+
87
99
/**
88
100
* Makes the string of all the AbfsInputStream statistics.
Copy file name to clipboardExpand all lines: hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStreamStatisticsImpl.java
+36Lines changed: 36 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,8 @@ public class AbfsInputStreamStatisticsImpl
33
33
privatelongreadOperations;
34
34
privatelongbytesReadFromBuffer;
35
35
privatelongremoteReadOperations;
36
+
privatelongreadAheadBytesRead;
37
+
privatelongremoteBytesRead;
36
38
37
39
/**
38
40
* Seek backwards, incrementing the seek and backward seek counters.
@@ -128,6 +130,30 @@ public void readOperationStarted(long pos, long len) {
128
130
readOperations++;
129
131
}
130
132
133
+
/**
134
+
* Total bytes read from readAhead buffer during a read operation.
135
+
*
136
+
* @param bytes the bytes to be incremented.
137
+
*/
138
+
@Override
139
+
publicvoidreadAheadBytesRead(longbytes) {
140
+
if (bytes > 0) {
141
+
readAheadBytesRead += bytes;
142
+
}
143
+
}
144
+
145
+
/**
146
+
* Total bytes read remotely after nothing was read from readAhead buffer.
147
+
*
148
+
* @param bytes the bytes to be incremented.
149
+
*/
150
+
@Override
151
+
publicvoidremoteBytesRead(longbytes) {
152
+
if (bytes > 0) {
153
+
remoteBytesRead += bytes;
154
+
}
155
+
}
156
+
131
157
/**
132
158
* {@inheritDoc}
133
159
*
@@ -178,6 +204,14 @@ public long getRemoteReadOperations() {
178
204
returnremoteReadOperations;
179
205
}
180
206
207
+
publiclonggetReadAheadBytesRead() {
208
+
returnreadAheadBytesRead;
209
+
}
210
+
211
+
publiclonggetRemoteBytesRead() {
212
+
returnremoteBytesRead;
213
+
}
214
+
181
215
/**
182
216
* String operator describes all the current statistics.
183
217
* <b>Important: there are no guarantees as to the stability
0 commit comments