zhongjiajie commented on code in PR #11626:
URL: https://github.com/apache/dolphinscheduler/pull/11626#discussion_r981244678


##########
dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py:
##########
@@ -75,6 +80,22 @@ def __init__(
         auto_convert: Optional[bool] = True,
     ):
         self.java_gateway = launch_gateway(address, port, auto_convert)
+        gateway_version = "unknown"
+        with contextlib.suppress(Py4JError):
+            # 1. Java gateway version is too old: doesn't have method 
'getGatewayVersion()'
+            # 2. Error connecting to Java gateway
+            gateway_version = self.get_gateway_version()

Review Comment:
   well done



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to