You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/03 03:14:27 UTC
[GitHub] [spark] amaliujia commented on a diff in pull request #38485: [SPARK-41001] [CONNECT] [PYTHON] Implementing Connection String for Python Client
amaliujia commented on code in PR #38485:
URL: https://github.com/apache/spark/pull/38485#discussion_r1012460587
##########
python/pyspark/sql/connect/client.py:
##########
@@ -42,6 +43,125 @@
logging.basicConfig(level=logging.INFO)
+class ChannelBuilder:
+ """
+ This is a helper class that is used to create a GRPC channel based on the given
+ connection string per the documentation of Spark Connect.
+ """
+
+ PARAM_USE_SSL = "use_ssl"
+ PARAM_TOKEN = "token"
+ PARAM_USER_ID = "user_id"
+
+ DEFAULT_PORT = 15002
Review Comment:
BTW, there is no equivalent Spark Conf, etc. for Python?
##########
python/pyspark/sql/connect/client.py:
##########
@@ -42,6 +43,125 @@
logging.basicConfig(level=logging.INFO)
+class ChannelBuilder:
+ """
+ This is a helper class that is used to create a GRPC channel based on the given
+ connection string per the documentation of Spark Connect.
+ """
+
+ PARAM_USE_SSL = "use_ssl"
+ PARAM_TOKEN = "token"
+ PARAM_USER_ID = "user_id"
Review Comment:
Is this case sensitive?
##########
python/pyspark/sql/tests/connect/test_connect_basic.py:
##########
@@ -18,6 +18,9 @@
import unittest
import shutil
import tempfile
+
+import grpc # type: ignore
Review Comment:
What was wrong for the `mypy` check on this import?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org