-
Notifications
You must be signed in to change notification settings - Fork 115
Changes to aid integration between SDG and Streaming ingestion #978
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
Conversation
some fixes. Signed-off-by: Govind Kamat <[email protected]>
| if size == 0: | ||
| return | ||
| yield key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a comment here that the streaming terminates here when empty file is encountered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be appropriate. Right now, the user model might change based on feedback, but once confirmed, this will be refactored.
| for key in keys['Contents']: | ||
| rsl.append(key['Key']) | ||
| def _get_next_key(self): | ||
| if len(self.keys) > 2 and self.keys.endswith('**'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does length of self.keys need to be at least 2?
len(self.keys) > 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that readers can better understand what's happening, we can abstract these clauses into methods that explain the action and return booleans
len(self.keys) > 2 and self.keys.endswith('**')
and
len(self.keys) > 1 and self.keys[-1] == '*':
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add this in the next update.
IanHoang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments.
Description
Changes to aid integration between SDG and Streaming ingestion and some fixes.
Testing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.