def spark_session_create(self, app_name):
"""
spark Loader Class
creadted for the purpose of handling Spark Jobs
"""
tfmsa_logger("Spark Session Created")
conf = SparkConf()
conf.setMaster('spark://{0}'.format(settings.SPARK_HOST))
conf.setAppName(app_name)
conf.set('spark.driver.cores', settings.SPARK_CORE)
conf.set('spark.driver.memory', settings.SPARK_MEMORY)
conf.set('spark.executor.cores', settings.SPARK_WORKER_CORE)
conf.set('spark.executor.memory', settings.SPARK_WORKER_MEMORY)
conf.set('spark.driver.allowMultipleContexts', "true")
return SparkContext(conf=conf)
评论列表
文章目录