You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/10/12 06:15:53 UTC

[GitHub] [flink] zhijiangW commented on a change in pull request #13523: [FLINK-15981][network] Implement FileRegion way to shuffle file-based blocking partition in network stack

zhijiangW commented on a change in pull request #13523:
URL: https://github.com/apache/flink/pull/13523#discussion_r503059525



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/PartitionData.java
##########
@@ -45,6 +51,14 @@
 
 	public abstract boolean isBuffer();
 
+	/**
+	 * Returns the buffer-format partition data with the provided memory segment or not.
+	 *
+	 * @param segment it might be needed to read the partition data into.
+	 * @return the buffer represents the partition data.
+	 */
+	public abstract Buffer getBuffer(@Nullable MemorySegment segment) throws IOException;

Review comment:
       TBH, I am a bit torn and not satisfied with introducing this method, since the argument `segment` seem not very elegant from the caller usage. But I did not think of a better option for resolving it 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org