You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by di...@apache.org on 2021/08/24 11:32:47 UTC
[flink] branch release-1.12 updated: [FLINK-23936][python] Disable
cleanup the Python UDFs which are inactive for a few minutes
This is an automated email from the ASF dual-hosted git repository.
dianfu pushed a commit to branch release-1.12
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.12 by this push:
new acea21c [FLINK-23936][python] Disable cleanup the Python UDFs which are inactive for a few minutes
acea21c is described below
commit acea21c016d2d95c1a512c767437c88683eb986e
Author: Dian Fu <di...@apache.org>
AuthorDate: Tue Aug 24 16:09:59 2021 +0800
[FLINK-23936][python] Disable cleanup the Python UDFs which are inactive for a few minutes
This would avoid reinitializing the Python UDFs which usually is a heavy operation
in scenarios such as machine learning, e.g., loading a big ML model
This closes #16958.
---
flink-python/pyflink/fn_execution/beam/beam_sdk_worker_main.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/flink-python/pyflink/fn_execution/beam/beam_sdk_worker_main.py b/flink-python/pyflink/fn_execution/beam/beam_sdk_worker_main.py
index e509d2f0..f8c0957 100644
--- a/flink-python/pyflink/fn_execution/beam/beam_sdk_worker_main.py
+++ b/flink-python/pyflink/fn_execution/beam/beam_sdk_worker_main.py
@@ -25,5 +25,9 @@ import pyflink.fn_execution.beam.beam_coders # noqa # pylint: disable=unused-imp
import apache_beam.runners.worker.sdk_worker_main
+# disable bundle processor shutdown
+from apache_beam.runners.worker import sdk_worker
+sdk_worker.DEFAULT_BUNDLE_PROCESSOR_CACHE_SHUTDOWN_THRESHOLD_S = 86400 * 365 * 100
+
if __name__ == '__main__':
apache_beam.runners.worker.sdk_worker_main.main(sys.argv)