reswqa commented on code in PR #20371:
URL: https://github.com/apache/flink/pull/20371#discussion_r932042311


##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/HsMemoryDataManager.java:
##########
@@ -106,6 +107,30 @@ public void append(ByteBuffer record, int targetChannel, 
Buffer.DataType dataTyp
         }
     }
 
+    /** Close this {@link HsMemoryDataManager}, it means no data can append to 
memory. */
+    public void close() {
+        Decision decision = callWithLock(() -> 
spillStrategy.onResultPartitionClosed(this));
+        handleDecision(Optional.of(decision));
+        spiller.close();
+    }
+
+    /**
+     * Release this {@link HsMemoryDataManager}, it means all memory taken by 
this class will
+     * recycle.
+     */
+    public void release() {
+        spiller.release();
+    }
+
+    /**
+     * Setup components of {@link HsMemoryDataManager}.
+     *
+     * <p>This method only called by main task thread.
+     */
+    public void setup() throws IOException {
+        spiller.setup();
+    }

Review Comment:
   Yes, fixed.



-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to