shuiqiangchen commented on a change in pull request #12061: URL: https://github.com/apache/flink/pull/12061#discussion_r422764493
########## File path: flink-python/pyflink/java_gateway.py ########## @@ -49,15 +49,19 @@ def get_gateway(): # if Java Gateway is already running if 'PYFLINK_GATEWAY_PORT' in os.environ: gateway_port = int(os.environ['PYFLINK_GATEWAY_PORT']) - callback_port = int(os.environ['PYFLINK_CALLBACK_PORT']) gateway_param = GatewayParameters(port=gateway_port, auto_convert=True) _gateway = JavaGateway( gateway_parameters=gateway_param, callback_server_parameters=CallbackServerParameters( - port=callback_port, daemonize=True, daemonize_connections=True)) + port=0, daemonize=True, daemonize_connections=True)) else: _gateway = launch_gateway() + callback_server = _gateway.get_callback_server() + listening_callback_address = callback_server.get_listening_address() Review comment: Thanks, I'll rename it to be more intuitive. ---------------------------------------------------------------- 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