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

Specify to_parquet keys explicitly to ensure ordering #3270

Closed
wants to merge 2 commits into from

Conversation

mrocklin
Copy link
Member

Previously we used delayed functions here, which don't order things in
an obvious way. Our task ordering heuristics use keys as tie-breakers
so they were performing sub-optimally when writing parquet data to disk

In the future, when convenient, we should endeavor to make our keys look
like the following:

('name-hash', int)
  • Tests added / passed
  • Passes flake8 dask
  • Fully documented, including docs/source/changelog.rst for all changes
    and one of the docs/source/*-api.rst files for new API

Previously we used delayed functions here, which don't order things in
an obvious way.  Our task ordering heuristics use keys as tie-breakers
so they were performing sub-optimally when writing parquet data to disk

In the future, when convenient, we should endeavor to make our keys look
like the following:

    ('name-hash', int)
for filename, part in zip(filenames, df.to_delayed())]
token = str(uuid.uuid1().hex)
writes = [write(part, fs, path, filename, fmd, compression, partition_on,
dask_key_name=('write-parquet-%s' % token, i))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...as easy as that! Perhaps this kind of thing should be documented in the devs pages.

@mrocklin
Copy link
Member Author

I will probably wait on #3271 to deal with this

@mrocklin mrocklin closed this Jan 3, 2019
@mrocklin mrocklin deleted the parquet-ordering branch January 3, 2019 17:44
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

Successfully merging this pull request may close these issues.

None yet

2 participants