Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is df.coalesce(1) necessary? #57

Open
sunayansaikia opened this issue Mar 13, 2019 · 6 comments
Open

Why is df.coalesce(1) necessary? #57

sunayansaikia opened this issue Mar 13, 2019 · 6 comments

Comments

@sunayansaikia
Copy link

Hey folks,

Just wanted to understand why 'df.coalesce(1)' was done while writing the dataframe to DFS?
Please refer code here: https://github.com/springml/spark-sftp/blob/master/src/main/scala/com/springml/spark/sftp/DefaultSource.scala#L249

Thanks

@samuel-pt
Copy link
Contributor

@sunayansaikia - That was done to have a single file in SFTP

@samuel-pt samuel-pt reopened this Mar 14, 2019
@sunayansaikia
Copy link
Author

Hey @samuel-pt : is this a hard requirement? Can we not download multiple files for upload via SFTP? Can't this option be made configurable?

@samuel-pt
Copy link
Contributor

@sunayansaikia - Its not hard. we can just add a configurable parameter and use it. Following are needed

  1. Actual Code changes
  2. Tests for the new changes
  3. README update accordingly

@sunayansaikia
Copy link
Author

ok - cool. Will take a checkout and see.

@shaikmanu797
Copy link

@sunayansaikia, the below PR should be able to fix the coalesce numPartitions configuration
#68

@sunayansaikia
Copy link
Author

@shaikmanu797 : Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants