[
https://issues.apache.org/jira/browse/FLINK-17124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dian Fu closed FLINK-17124.
---------------------------
Resolution: Fixed
Merged to master via ec1e863cf21b8381b4d7937e7b4e8f7add3145cf and release-1.10
via f67b4235ec631497c97dab2d4f3d0f9266f3467c
> The PyFlink Job runs into infinite loop if the Python UDF imports job code
> --------------------------------------------------------------------------
>
> Key: FLINK-17124
> URL: https://issues.apache.org/jira/browse/FLINK-17124
> Project: Flink
> Issue Type: Bug
> Components: API / Python
> Affects Versions: 1.10.0
> Reporter: Huang Xingbo
> Assignee: Huang Xingbo
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.10.1, 1.11.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> If the UDF file imports job code directly or indirectly, the PyFlink Job will
> run into a infinite loop as follows:
> - submit job
> - execute job
> - launch UDF worker
> - import UDF
> - (If the job file is depended by UDF or imported as the top level module)
> import job code
> - (If the job code is executed outside the "*if __name__ == '__main__':*")
> launch gateway server and submit job to local executor
> - execute job in local mode
> - launch UDF worker
> - import UDF
> - import job code
> ...
> This infinite loop will create new Java processes and Python processes
> endlessly until the resources on the machine are exhausted. We should fix it
> ASAP.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)