Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/22247#discussion_r213173845
--- Diff: python/pyspark/java_gateway.py ---
@@ -147,6 +147,39 @@ def do_server_auth(conn, auth_secret):
raise Exception("Unexpected reply from iterator server.")
+def local_connect_and_auth(sock_info):
--- End diff --
@squito, not a big deal but how about `local_connect_and_auth (port,
auth_secret)` and ..
```python
(sockfile, sock) = local_connect_and_auth(port, auth_secret)
```
```python
(sock_file, _) = local_connect_and_auth(java_port, auth_secret)
```
```python
port, auth_secret = sock_info
(sockfile, sock) = local_connect_and_auth(port, auth_secret)
```
or
```python
(sockfile, sock) = local_connect_and_auth(*sock_info)
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]