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



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
##########
@@ -1772,9 +1774,17 @@ private StateBackend loadStateBackend(ReadableConfig 
configuration, ClassLoader
                         + 
ContinuousFileMonitoringFunction.MIN_MONITORING_INTERVAL
                         + " ms.");
 
+        Configuration conf = (Configuration) 
getExecutionEnvironment().getConfiguration();
+        int readerParallelism = getParallelism();
+        if(readerParallelism == -1
+                && ClusterOptions.getSchedulerType(conf) == 
JobManagerOptions.SchedulerType.AdaptiveBatch) {
+            readerParallelism = conf.get(

Review comment:
       
[StreamExecutionEnvironment#getExecutionEnvironment()](https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#:~:text=public%20static%20StreamExecutionEnvironment%20getExecutionEnvironment()%20%7B)
 will load conf to initialize configuration, I have debugged the code, it will 
not lead to an empty configuration. On the contrary, getConfiguration() get the 
value of 
[configuration](https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L208),
  it is an empty configuration created in 
[StreamExecutionEnvironment()](https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L221)




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