This is an automated email from the ASF dual-hosted git repository.

azagrebin pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 2fb7b146718b5f1d5cc4b77e3f320b27b8683f5e
Author: Andrey Zagrebin <[email protected]>
AuthorDate: Mon Jun 8 16:18:30 2020 +0300

    [hotfix] Improve JavaDocs comments for FlinkMemory/FlinkMemoryUtis
---
 .../runtime/util/config/memory/FlinkMemory.java     | 21 +++++++++++++++++++++
 .../util/config/memory/FlinkMemoryUtils.java        |  9 +++++++--
 .../jobmanager/JobManagerFlinkMemoryUtils.java      |  2 ++
 .../taskmanager/TaskExecutorFlinkMemoryUtils.java   |  3 +++
 4 files changed, 33 insertions(+), 2 deletions(-)

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/FlinkMemory.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/FlinkMemory.java
index 976665d..60dc9b9 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/FlinkMemory.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/FlinkMemory.java
@@ -24,6 +24,27 @@ import java.io.Serializable;
 
 /**
  * Memory components which constitute the Total Flink Memory.
+ *
+ * <p>The relationships of Flink JVM and rest memory components are shown 
below.
+ * <pre>
+ *               ┌ ─ ─  Total Flink Memory - ─ ─ ┐
+ *                 ┌───────────────────────────┐
+ *               | │       JVM Heap Memory     │ |
+ *                 └───────────────────────────┘
+ *               |┌ ─ ─ - - - Off-Heap  - - ─ ─ ┐|
+ *                │┌───────────────────────────┐│
+ *               │ │     JVM Direct Memory     │ │
+ *                │└───────────────────────────┘│
+ *               │ ┌───────────────────────────┐ │
+ *                ││   Rest Off-Heap Memory    ││
+ *               │ └───────────────────────────┘ │
+ *                └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘
+ *               └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘
+ * </pre>
+ *
+ * <p>The JVM and rest memory components can consist of further concrete Flink 
memory components depending on the process type.
+ * The Flink memory components can be derived from either its total size or a 
subset of configured required fine-grained components.
+ * Check the implementations for details about the concrete components.
  */
 public interface FlinkMemory extends Serializable {
        MemorySize getJvmHeapMemorySize();
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/FlinkMemoryUtils.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/FlinkMemoryUtils.java
index 28f45a1..ca675b1 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/FlinkMemoryUtils.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/FlinkMemoryUtils.java
@@ -22,8 +22,13 @@ import org.apache.flink.configuration.Configuration;
 import org.apache.flink.configuration.MemorySize;
 
 /**
- * Utility to derive Total Flink Memory from its required memory components 
and back.
- * @param <FM> the FLink memory components
+ * Utility to derive the {@link FlinkMemory} components.
+ *
+ * <p>The {@link FlinkMemory} represents memory components which constitute 
the Total Flink Memory.
+ * The Flink memory components can be derived from either its total size or a 
subset of configured required fine-grained components.
+ * See implementations for details about the concrete fine-grained components.
+ *
+ * @param <FM> the Flink memory components
  */
 public interface FlinkMemoryUtils<FM extends FlinkMemory> {
        FM deriveFromRequiredFineGrainedOptions(Configuration config);
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/jobmanager/JobManagerFlinkMemoryUtils.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/jobmanager/JobManagerFlinkMemoryUtils.java
index 58f0378..b22b6e6 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/jobmanager/JobManagerFlinkMemoryUtils.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/jobmanager/JobManagerFlinkMemoryUtils.java
@@ -30,6 +30,8 @@ import org.slf4j.LoggerFactory;
 
 /**
  * {@link FlinkMemoryUtils} for Job Manager.
+ *
+ * <p>The required fine-grained component is {@link 
JobManagerOptions#JVM_HEAP_MEMORY}.
  */
 public class JobManagerFlinkMemoryUtils implements 
FlinkMemoryUtils<JobManagerFlinkMemory> {
        private static final Logger LOG = 
LoggerFactory.getLogger(JobManagerFlinkMemoryUtils.class);
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/taskmanager/TaskExecutorFlinkMemoryUtils.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/taskmanager/TaskExecutorFlinkMemoryUtils.java
index a49fb5f..a920c29 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/taskmanager/TaskExecutorFlinkMemoryUtils.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/config/memory/taskmanager/TaskExecutorFlinkMemoryUtils.java
@@ -35,6 +35,9 @@ import static 
org.apache.flink.util.Preconditions.checkArgument;
 
 /**
  * {@link FlinkMemoryUtils} for Task Executor.
+ *
+ * <p>The required fine-grained components are {@link 
TaskManagerOptions#TASK_HEAP_MEMORY} and
+ * {@link TaskManagerOptions#MANAGED_MEMORY_SIZE}.
  */
 public class TaskExecutorFlinkMemoryUtils implements 
FlinkMemoryUtils<TaskExecutorFlinkMemory> {
        private static final Logger LOG = 
LoggerFactory.getLogger(TaskExecutorFlinkMemoryUtils.class);

Reply via email to