Al 131 add streaming read#33
Draft
cccs-douglass wants to merge 8 commits into
Draft
Conversation
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
==========================================
+ Coverage 60.89% 61.17% +0.28%
==========================================
Files 115 115
Lines 9852 9981 +129
==========================================
+ Hits 5999 6106 +107
- Misses 3853 3875 +22
Continue to review full report at Codecov.
|
cccs-douglass
commented
Oct 14, 2020
| if self.readthread is None: | ||
| self.readthread = threading.Thread(target=self.retrMethod(chunk_size), daemon=True) | ||
| self.readthread.start() | ||
| chunk = self.filequeue.get() |
Collaborator
Author
There was a problem hiding this comment.
Make sure read method doesn't get blocked forever if there is an extra call to read after the last one that returns none
cccs-douglass
commented
Oct 14, 2020
| self.response.close() | ||
|
|
||
| def read(self, chunk_size=1024): | ||
| return next(self.response.iter_content(chunk_size=chunk_size)) No newline at end of file |
Collaborator
Author
There was a problem hiding this comment.
Correct me if I'm wrong, but we probably don't want to be created a new iterator on every call to read
cccs-douglass
commented
Oct 14, 2020
| return path | ||
| return os.path.join(base, path.lstrip("/")).replace("\\", "/") | ||
|
|
||
| class TransportReadStreamLocal(TransportReadStream): |
Collaborator
Author
There was a problem hiding this comment.
You probably don't need this class, and can return the file object directly from read
- Adds TransportFile and TransportFile children objects
- Adds TransportReadStreamS3 object
- Adds FTP implementation
- Changes TransportFile to TransportReadStream - Adds some tests - Fixes s3 Transport's read function - Adds sftp Transport's read function
- Adds HTTP read implementation - Adds testing for local, http, https read
- creates infrastructure for FTP test with docker container
- Adds ftp filestore tests - Adds ftpserver docker container
- Adds SFTP server container to docker compose - Adds lines for testing read() operations
a3e3354 to
c805dd5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A PR to discuss ongoing work related to streaming read operations in the filestore