reswqa commented on code in PR #20371:
URL: https://github.com/apache/flink/pull/20371#discussion_r933247522
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/HsSubpartitionMemoryDataManager.java:
##########
@@ -247,6 +261,17 @@ public void
releaseSubpartitionBuffers(List<BufferIndexAndChannel> toRelease) {
}));
}
+ /** Un-synchronized get number of buffers not consumed. */
+ @SuppressWarnings("FieldAccessNotGuarded")
+ public int getNumOfBuffersUnsafe() {
+ return unConsumedBuffers.size();
+ }
+
+ /** Un-synchronized get number of bytes not consumed. */
+ public long getNumOfBytesUnsafe() {
+ return getNumOfBuffersUnsafe() * (long) bufferSize;
+ }
+
Review Comment:
It is used for provide information of queued buffers. After some
consideration, I think it is of little significance to provide this information
for non pipelined shuffle, so I removed this part of the calculation now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]