HyukjinKwon commented on a change in pull request #23337: 
[SPARK-26019][PYSPARK] Allow insecure py4j gateways
URL: https://github.com/apache/spark/pull/23337#discussion_r242764572
 
 

 ##########
 File path: python/pyspark/context.py
 ##########
 @@ -112,6 +112,18 @@ def __init__(self, master=None, appName=None, 
sparkHome=None, pyFiles=None,
         ValueError:...
         """
         self._callsite = first_spark_call() or CallSite(None, None, None)
+        if gateway is not None and gateway.gateway_parameters.auth_token is 
None:
+            if conf and conf.get("spark.python.allowInsecurePy4j", "false") == 
"true":
 
 Review comment:
   I just happened to know a bit due to a bit of related work lately .. not an 
expert but both indeed are pretty much feasible, and IMHO env is easier and 
cleaner. 
   
   cc @zjffdu and maybe .. @Leemoonsoo as well .. (?) for sure.
   
   The argument here is basically which one is better in Zeppelin PySpark 
interpreter side: 
   
   1. The config  to control a behaviour- but to be set only in the `SparkConf` 
object (instead of allowing it to be in a config file)
   2. The environment variable to control a behaviour.
   
   This conf or env might have to be set in Zeppelin side to allow insecure 
connection if I am not mistaken. We're not sure which one is preferred. To me, 
env looks preferred IMHO.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to