应该是什么spark.sql.shuffle.partitions的最佳值或使用SQL星火的时候,我们如何增加分区? [英] What should be the optimal value for spark.sql.shuffle.partitions or how do we increase partitions when using Spark SQL?

查看:2112
本文介绍了应该是什么spark.sql.shuffle.partitions的最佳值或使用SQL星火的时候,我们如何增加分区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用SQL星火实际上 hiveContext.sql()它通过查询使用组和我遇到 OOM 的问题。所以,想从200默认增加 spark.sql.shuffle.partitions 的价值为1000,但它并没有帮助。如果我错了这个分区将共享数据洗牌负荷,从而更分区较少的数据保存请指正。请指导我是新来的火花。我使用的Spark 1.4.0和我身边有uncom $ P $的1TB pssed数据使用 hiveContext.sql() GROUP BY的查询处理。

Hi I am using Spark SQL actually hiveContext.sql() which uses group by queries and I am running into OOM issues. So thinking of increasing value of spark.sql.shuffle.partitions from 200 default to 1000 but it is not helping. Please correct me if I am wrong this partitions will share data shuffle load so more the partitions less data to hold. Please guide I am new to Spark. I am using Spark 1.4.0 and I have around 1TB of uncompressed data to process using hiveContext.sql() group by queries.

推荐答案

行,所以我觉得你的问题是更普遍。这不是具体到星火SQL,它与星火一般的问题,即忽略你告诉它当文件是几个分区的数量。星火似乎有相同数量的分区作为文件对HDFS的数量,除非你叫再分配。因此调用再分配应该工作,但造成了一定程度洗牌不必要的警告。

OK so I think your issue is more general. It's not specific to Spark SQL, it's a general problem with Spark where it ignores the number of partitions you tell it when the files are few. Spark seems to have the same number of partitions as the number of files on HDFS, unless you call repartition. So calling repartition ought to work, but has the caveat of causing a shuffle somewhat unnecessarily.

我刚才提出这个问题,并有仍然还没有得到一个很好的答案:(

I raised this question a while ago and have still yet to get a good answer :(

<一个href=\"http://stackoverflow.com/questions/27039246/spark-increase-number-of-partitions-without-causing-a-shuffle\">Spark:增加分区的数量,而不会导致洗牌?

这篇关于应该是什么spark.sql.shuffle.partitions的最佳值或使用SQL星火的时候,我们如何增加分区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆