Skip to content

Instantly share code, notes, and snippets.

@abronte
Created November 7, 2019 00:27
Show Gist options
  • Select an option

  • Save abronte/5815043c076338f2ff922a55d6f7e997 to your computer and use it in GitHub Desktop.

Select an option

Save abronte/5815043c076338f2ff922a55d6f7e997 to your computer and use it in GitHub Desktop.
Pyspark Gateway spark context initialization
from pyspark_gateway import PysparkGateway
pg = PysparkGateway()
from pyspark import SparkContext, SparkConf
conf = conf.set('spark.io.encryption.enabled', 'true')
sc = SparkContext(gateway=pg.gateway, conf=conf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment