KarmaGYZ commented on a change in pull request #11854:
URL: https://github.com/apache/flink/pull/11854#discussion_r425575563



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/iterative/task/AbstractIterativeTask.java
##########
@@ -183,8 +186,9 @@ protected void closeLocalStrategiesAndCaches() {
        @Override
        public DistributedRuntimeUDFContext createRuntimeContext(MetricGroup 
metrics) {
                Environment env = getEnvironment();
+
                return new IterativeRuntimeUdfContext(env.getTaskInfo(), 
getUserCodeClassLoader(),
-                               getExecutionConfig(), 
env.getDistributedCacheEntries(), this.accumulatorMap, metrics);
+                               getExecutionConfig(), 
env.getDistributedCacheEntries(), this.accumulatorMap, metrics, 
ExternalResourceUtils.getExternalResourceInfo(env.getExternalResourceDrivers(), 
env.getTaskManagerInfo().getConfiguration()));

Review comment:
       I think it would not be expensive since we only retrieve the 
`ExternalResourceInfos` at the first time. After that, it will use the cache in 
`SharedExternalResources`.




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

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


Reply via email to