dianfu commented on a change in pull request #10017: [FLINK-14019][python] add
support for managing environment and dependencies of Python UDF in Flink Python
API
URL: https://github.com/apache/flink/pull/10017#discussion_r348489736
##########
File path:
flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractPythonFunctionOperator.java
##########
@@ -275,4 +315,12 @@ private void invokeFinishBundle() throws Exception {
}
}
}
+
+ private String getPythonTmpDirectoryRoot() {
+ String[] tmpDirectories =
+
getContainingTask().getEnvironment().getTaskManagerInfo().getTmpDirectories();
+ Random rand = new Random();
+ int tmpDirectoryIndex = rand.nextInt() % tmpDirectories.length;
+ return tmpDirectories[tmpDirectoryIndex];
Review comment:
All the tmp directories should be given to PythonEnvironmentManager and then
it can add some retry logic similar to
`SpillingAdaptiveSpanningRecordDeserializer.createSpillingChannel`
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services