WencongLiu commented on code in PR #22316:
URL: https://github.com/apache/flink/pull/22316#discussion_r1184920929
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/tier/TierConsumerAgent.java:
##########
@@ -18,5 +18,21 @@
package org.apache.flink.runtime.io.network.partition.hybrid.tiered.tier;
+import org.apache.flink.runtime.io.network.partition.consumer.InputChannel;
+
+import java.io.Closeable;
+import java.util.Optional;
+
/** The consumer-side agent of a Tier. */
-public interface TierConsumerAgent {}
+public interface TierConsumerAgent extends Closeable {
+
+ /**
+ * Get buffer from the client according to specific subpartition and
segment id.
+ *
+ * @param inputChannel indicates the subpartition to read.
+ * @param segmentId indicate the id of segment.
+ * @return the next buffer.
+ */
+ Optional<InputChannel.BufferAndAvailability> getNextBuffer(
+ InputChannel inputChannel, int segmentId);
Review Comment:
InputChannel has been removed. BufferAndAvailability is actually the
combination of essential information required by SingleInputGate.Maybe the
public class BufferAndAvailability can be moved outside from InputChannel?
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/tier/TierConsumerAgent.java:
##########
@@ -18,5 +18,21 @@
package org.apache.flink.runtime.io.network.partition.hybrid.tiered.tier;
+import org.apache.flink.runtime.io.network.partition.consumer.InputChannel;
+
+import java.io.Closeable;
+import java.util.Optional;
+
/** The consumer-side agent of a Tier. */
-public interface TierConsumerAgent {}
+public interface TierConsumerAgent extends Closeable {
+
+ /**
+ * Get buffer from the client according to specific subpartition and
segment id.
+ *
+ * @param inputChannel indicates the subpartition to read.
+ * @param segmentId indicate the id of segment.
+ * @return the next buffer.
+ */
+ Optional<InputChannel.BufferAndAvailability> getNextBuffer(
+ InputChannel inputChannel, int segmentId);
Review Comment:
Done.
--
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]