Code
from pyspark.sql import SparkSession
spark = SparkSession.builder \
.appName('3_test_sparksession') \
.master('spark://spark-master:17077') \
.config('spark.driver.cores', '1') \
.config('spark.driver.memory','1g') \
.config('spark.executor.memory', '1g') \
.config('spark.executor.cores', '2') \
.config('spark.cores.max', '2') \
.getOrCreate()
sc = spark.sparkContext
for setting in sc._conf.getAll():
print(setting)
sc.stop()
Result
'Data Engineering > Spark' 카테고리의 다른 글
[Spark] spark standalone cluster + zookeeper cluster 로 고가용성 확보하기 (0) | 2022.06.05 |
---|---|
[Zookeeper] 도커로 주키퍼 클러스터 만드는 방법 (0) | 2022.06.05 |
[Spark] How to use the Global Temporary View (0) | 2022.06.04 |
[Spark] Basic way to use spark data frames with sql query (0) | 2022.06.04 |
[Spark] Compare user settings in pyspark code (0) | 2022.06.04 |