amazon-s3 - S3 中的最佳最大 Parquet 文件大小

标签 amazon-s3 parquet

我正在尝试确定在 S3 上对 Parquet 数据进行分区时的最佳文件大小。 AWS 推荐 avoiding having files less than 128MB .但是也有推荐的最大文件大小吗?

Databricks 推荐 files should be around 1GB ,但我不清楚这是否仅适用于 HDFS。我知道最佳文件大小取决于 HDFS 块大小。但是,S3 没有任何块大小的概念。

有什么想法吗?

最佳答案

您可能应该考虑两件事:

1) 在纯对象存储(例如 s3)的情况下,在 s3 方面,您的块大小无关紧要 - 您不需要对齐任何东西。

2)更重要的是你将如何以及用什么读取数据?
考虑分区、修剪、行组和谓词下推——还有你将如何加入这个?

例如:Presto (Athena) 更喜欢超过 128Mb 的文件,但太大会导致并行化不佳 - 我通常针对 1-2gb 的文件

Redshift 更喜欢大规模并行,例如4 个节点,160 个文件会比 4 个节点 4 个文件更好 :)

建议阅读:
https://www.upsolver.com/blog/aws-athena-performance-best-practices-performance-tuning-tips
https://aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena/

关于amazon-s3 - S3 中的最佳最大 Parquet 文件大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55034284/

相关文章:

python - PySpark 将空字符串转换为 null 并写入 Parquet

hive - Hive中基于分区列和非分区列的查询

Django ManifestStaticFilesStorage 未加载正确的静态文件

hadoop - 使用 -query 和 --as-parquetfile 运行 Sqoop : java. lang.NullPointerException 时出现异常

amazon-web-services - 限制 S3-bucket 更改为公开吗?

java - 如何使用 Java SDK 更改 S3 对象的存储类?

python - 如何在没有 RLE_DICTIONARY 编码的情况下将 CSV 转换为 Parquet 文件?

scala - 写入 Parquet 时出现 NullPointerException

amazon-web-services - Terraform 破坏错误 'Instance cannot be destroyed' 和 'Failed getting S3 bucket'

amazon-web-services - 是否可以在 Amazon S3 中设置 Content-Security-Policy header ?