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

Make transformer able to handle larger files by streaming #156

Merged
merged 1 commit into from
Jun 10, 2023

Conversation

Samrose-Ahmed
Copy link
Contributor

@Samrose-Ahmed Samrose-Ahmed commented Jun 7, 2023

Can handle larger files by buffering and flushing to S3.

Memory stays low and can handle large files by processing longer.

Timeouts are still an issue, a more optimal approach is to pre split work (even virtually with byte offsets) and have predictable data size. That's a more involved change that will likely not be worked on right now, but this code is still useful.

Related: #155

download_items: Vec<(DataBatcherOutputRecord, String)>,
mut stream: Pin<Box<dyn Stream<Item = Result<LineResult, LineError>> + Send>>,
) -> Result<(
Vec<(String, String, String, usize, usize)>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Too much tuple, should use a struct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree its metrics stuff, will do sepretly,

Copy link
Contributor

@shaeqahmed shaeqahmed left a comment

Choose a reason for hiding this comment

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

LGTM overall, some small comments

lib/rust/transformer/src/main.rs Outdated Show resolved Hide resolved
lib/rust/transformer/src/main.rs Outdated Show resolved Hide resolved
lib/rust/transformer/src/main.rs Show resolved Hide resolved
Can handle larger files by buffering and flushing to S3.

Signed-off-by: 🐼 Samrose Ahmed 🐼 <[email protected]>
@Samrose-Ahmed Samrose-Ahmed merged commit 3936e4c into matanolabs:main Jun 10, 2023
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