Apache spark 预测S3阅读任务的数量
我有Apache spark 预测S3阅读任务的数量,apache-spark,apache-spark-sql,Apache Spark,Apache Spark Sql,我有10个parquet文件,每个文件大小约为830MB,位于S3bucket上,用于cust表 如何预测Spark SQL将启动多少任务来读取此输入(从S3)以运行以下查询- select cust_id, prod_id, count(*) from cust group by 1, 2 having count(*) > 1 根据,我的计算结果是65任务,而实际上,Spark正在启动67任务。我哪里做错了 spark.read.parquet(“s3://bucket/path/t
10个parquet文件,每个文件大小约为830
MB,位于S3
bucket上,用于cust
表
如何预测Spark SQL将启动多少任务来读取此输入(从S3)以运行以下查询-
select cust_id, prod_id, count(*)
from cust
group by 1, 2
having count(*) > 1
根据,我的计算结果是65
任务,而实际上,Spark正在启动67
任务。我哪里做错了
spark.read.parquet(“s3://bucket/path/to/folder/”).rdd.getNumPartitions
=67
环境参数值如下所示:
spark.executor.cores = 2
spark.sql.files.maxPartitionBytes = 134217728
spark.sql.files.openCostInBytes = 4194304
sc.defaultParallelism = 2
请纠正我的理解。感谢您的帮助。谢谢