wanglijie95 commented on a change in pull request #17952:
URL: https://github.com/apache/flink/pull/17952#discussion_r763915988



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptivebatch/VertexParallelismDecider.java
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.scheduler.adaptivebatch;
+
+import java.util.List;
+
+/**
+ * {@link VertexParallelismDecider} is responsible for determining the 
parallelism of a job vertex,
+ * based on the size of the consumed blocking results.
+ */
+public interface VertexParallelismDecider {
+
+    /**
+     * Computing the parallelism.
+     *
+     * @param consumedResults The size of consumed blocking results.

Review comment:
       fixed

##########
File path: 
flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java
##########
@@ -480,6 +480,47 @@
                     .withDescription(
                             "Controls whether partitions should already be 
released during the job execution.");
 
+    @Documentation.Section({
+        Documentation.Sections.EXPERT_SCHEDULING,
+        Documentation.Sections.ALL_JOB_MANAGER
+    })
+    public static final ConfigOption<Integer> 
ADAPTIVE_BACH_SCHEDULER_MIN_PARALLELISM =
+            key("jobmanager.scheduler.adaptive-batch.min-parallelism")
+                    .intType()
+                    .defaultValue(1)
+                    .withDescription("The lower bound of allowed parallelism 
to set adaptively");
+
+    @Documentation.Section({
+        Documentation.Sections.EXPERT_SCHEDULING,
+        Documentation.Sections.ALL_JOB_MANAGER
+    })
+    public static final ConfigOption<Integer> 
ADAPTIVE_BATCH_SCHEDULER_MAX_PARALLELISM =
+            key("jobmanager.scheduler.adaptive-batch.max-parallelism")
+                    .intType()
+                    .defaultValue(128)
+                    .withDescription("The upper bound of allowed parallelism 
to set adaptively");
+
+    @Documentation.Section({
+        Documentation.Sections.EXPERT_SCHEDULING,
+        Documentation.Sections.ALL_JOB_MANAGER
+    })
+    public static final ConfigOption<MemorySize> 
ADAPTIVE_BATCH_SCHEDULER_DATA_VOLUME_PER_TASK =
+            key("jobmanager.scheduler.adaptive-batch.data-volume-per-task")
+                    .memoryType()
+                    .defaultValue(MemorySize.ofMebiBytes(1024))
+                    .withDescription(
+                            "The size of data volume to expect each task 
instance to process.");
+
+    @Documentation.Section({
+        Documentation.Sections.EXPERT_SCHEDULING,
+        Documentation.Sections.ALL_JOB_MANAGER
+    })
+    public static final ConfigOption<Integer> 
ADAPTIVE_BATCH_SCHEDULER_DEFAULT_SOURCE_PARALLELISM =
+            
key("jobmanager.scheduler.adaptive-batch.source-parallelism.default")
+                    .intType()
+                    .defaultValue(1)
+                    .withDescription("The default parallelism of source 
vertices.");

Review comment:
       I added it.




-- 
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]


Reply via email to