This is an automated email from the ASF dual-hosted git repository. dianfu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push: new aa263f8 [FLINK-17628][python] Remove the unnecessary py4j log information. (#12098) aa263f8 is described below commit aa263f8a42b43571e9be674f151b0c95a692ac97 Author: Shuiqiang Chen <acqua....@alibaba-inc.com> AuthorDate: Wed May 13 09:18:47 2020 +0800 [FLINK-17628][python] Remove the unnecessary py4j log information. (#12098) --- flink-python/pyflink/java_gateway.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flink-python/pyflink/java_gateway.py b/flink-python/pyflink/java_gateway.py index 33ab2ae..b778515 100644 --- a/flink-python/pyflink/java_gateway.py +++ b/flink-python/pyflink/java_gateway.py @@ -22,9 +22,11 @@ import shutil import struct import tempfile import time +from logging import WARN from threading import RLock -from py4j.java_gateway import java_import, JavaGateway, GatewayParameters, CallbackServerParameters +from py4j.java_gateway import (java_import, logger, JavaGateway, GatewayParameters, + CallbackServerParameters) from pyflink.pyflink_gateway_server import launch_gateway_server_process from pyflink.util.exceptions import install_exception_handler @@ -46,6 +48,8 @@ def get_gateway(): global _lock with _lock: if _gateway is None: + # Set the level to WARN to mute the noisy INFO level logs + logger.level = WARN # if Java Gateway is already running if 'PYFLINK_GATEWAY_PORT' in os.environ: gateway_port = int(os.environ['PYFLINK_GATEWAY_PORT'])