[
https://issues.apache.org/jira/browse/SPARK-8890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14628533#comment-14628533
]
Ilya Ganelin commented on SPARK-8890:
-------------------------------------
Once data is sorted, is the number of partitions guaranteed to be under that
limit? When we're talking about sorting, are we talking about which columns are
in which partition?
I want to make sure I understand what is happening. When we ingest a data
frame, we consume a set of data organized by columns (the schema). When this
data is partitioned, does all data under a certain column go to the same
partition? If not, what happens in this stage?
We create a new ```outputWriter``` for each row based on the columns within
that row (from the projected columns). New ```outputWriters``` become necessary
when the columns within a row are different. However, given that the schema is
fixed, where does this variability come from and what does it mean to "sort" in
this context?
> Reduce memory consumption for dynamic partition insert
> ------------------------------------------------------
>
> Key: SPARK-8890
> URL: https://issues.apache.org/jira/browse/SPARK-8890
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Reporter: Reynold Xin
> Priority: Critical
>
> Currently, InsertIntoHadoopFsRelation can run out of memory if the number of
> table partitions is large. The problem is that we open one output writer for
> each partition, and when data are randomized and when the number of
> partitions is large, we open a large number of output writers, leading to OOM.
> The solution here is to inject a sorting operation once the number of active
> partitions is beyond a certain point (e.g. 50?)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]