Skip to content

Conversation

selitvin
Copy link
Collaborator

When writing data into a petastorm dataset. Before a pyspark sql.Row
object is created, fields containing data that is not natively supported
by Parqyet format, such as numpy arrays, are serialized into byte
arrays. Images maybe compressed using png or jpeg compression.

Serializing fields on a thread pool speeds up this process in some
cases (e.g. a row contains multiple images).

@selitvin selitvin marked this pull request as draft April 20, 2020 05:28
@selitvin selitvin force-pushed the parallel_encoding branch from 367736c to 5fe4e11 Compare April 20, 2020 05:38
Fields that contain data that is not natively supported
by Parqyet format, such as numpy arrays, are serialized into byte
arrays. Images maybe compressed using png or jpeg compression.

Serializing fields on a thread pool speeds up this process in some
cases (e.g. a row contains multiple images).

This PR adds a pool executor argument to `dict_to_spark_row` enabling
user to pass a pool executor that would be used for parallelizing
this serialization. If no pool executor is specified, the
encoding/serialization is performed on the caller thread.
@selitvin selitvin force-pushed the parallel_encoding branch from 5fe4e11 to 3fe68d4 Compare April 20, 2020 06:56
@codecov
Copy link

codecov bot commented Apr 20, 2020

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.99%. Comparing base (83a02df) to head (3fe68d4).
⚠️ Report is 141 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #546      +/-   ##
==========================================
+ Coverage   82.88%   85.99%   +3.11%     
==========================================
  Files          85       87       +2     
  Lines        4721     4935     +214     
  Branches      744      783      +39     
==========================================
+ Hits         3913     4244     +331     
+ Misses        678      568     -110     
+ Partials      130      123       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Yevgeni Litvin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants