53097/benefit-repartition-coalesce-repartition-partition-create
Toggle navigation
Back
Ask a question
Blogs
Browse Categories
Browse Categories
Generative AI
Power BI
DevOps & Agile
Data Science
ChatGPT
Cyber Security & Ethical Hacking
Data Analytics
Cloud Computing
Machine Learning
PMP
Python
SalesForce
Selenium
Software Testing
Tableau
Web Development
UI UX Design
Java
Azure
Database
Big Data Hadoop
Blockchain
Digital Marketing
C#
C++
IoT (Internet of Things)
Kotlin
Linux Administration
MicroStrategy
Mobile Development
Others
RPA
Talend
TypeSript
Apache Kafka
Apache Spark
Career Counselling
Events & Trending Topics
Ask us Anything!
Log In
Sign Up
Home
Community
Categories
Apache Spark
what is the benefit of repartition 1 and...
what is the benefit of repartition 1 and coalesce 1 When we save data we use df repartition 1 so how many partition it will create
–1
vote
what is the benefit of repartition(1) and coalesce(1). When we save data we use df.repartition(1).so how many partition it will create
Jul 26, 2019
in
Apache Spark
by
kumar Ma
•
6,733
views
answer
comment
flag
In case you use .repartition(1) it will only create a single file per partition. the main benefit is, the less the number of file per partition, the higher the reading speed will be. However if the file size becomes more than or almost a GB, then better to go for 2nd partition like .repartition(2).
In case or repartition all data gets re shuffled. and all the files under a partition have almost same size.
by using coalesce you can just reduce the amount of Data being shuffled.
Your comment on this question:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Add comment
Cancel
No answer to this question. Be the first to respond.
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Add answer
Related Questions In Apache Spark
0
votes