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 2022/03/13 16:51:52 UTC

[GitHub] [flink] zhuzhurk commented on a change in pull request #19040: [FLINK-26548][runtime] set the source parallelism correctly when using legacy file sources with AdaptiveBatcheScheduler

zhuzhurk commented on a change in pull request #19040:
URL: https://github.com/apache/flink/pull/19040#discussion_r825474342



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
##########
@@ -1772,9 +1773,23 @@ private StateBackend loadStateBackend(ReadableConfig configuration, ClassLoader
                         + ContinuousFileMonitoringFunction.MIN_MONITORING_INTERVAL
                         + " ms.");
 
+        int readerParallelism = getParallelism();
+
+        boolean isAdaptiveBatchSchedulerEnabled =
+                readerParallelism == ExecutionConfig.PARALLELISM_DEFAULT
+                        && getConfig().isDynamicGraph();
+
+        if (isAdaptiveBatchSchedulerEnabled) {
+            readerParallelism =
+                    getConfiguration()

Review comment:
       `getConfiguration()` may be empty when executing sql jobs and will make this fix ineffective in that case. This problem seems to be caused by `DummyStreamExecutionEnvironment` which does not properly override `getConfiguration()`. But we are still looking into some details to figure out whether it is safe to fix it by simply do the overriding.

##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
##########
@@ -1772,9 +1773,23 @@ private StateBackend loadStateBackend(ReadableConfig configuration, ClassLoader
                         + ContinuousFileMonitoringFunction.MIN_MONITORING_INTERVAL
                         + " ms.");
 
+        int readerParallelism = getParallelism();
+
+        boolean isAdaptiveBatchSchedulerEnabled =

Review comment:
       Maybe `useDynamicGraphSourceParallelism` is more accurate because conceptually `isAdaptiveBatchSchedulerEnabled == getConfig().isDynamicGraph()`.




-- 
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-unsubscribe@flink.apache.org

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