-
Notifications
You must be signed in to change notification settings - Fork 20
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
Adding ChunkManager implementation #206
Conversation
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.
Thanks @AnatolyPopov.
I think we need some tests for this component as well.
Also, some general comments:
The getChunk
implementation (decrypt, decompress) corresponds to the uploading logic (compress, encrypt). These should be on the same place.
I see two alternatives to do this:
- URSM implementing this interface
- Extending this class to handle all interaction between Kafka TS ops and ObjectStorageFactory:
- In this case, I'd rename the class to
ChunkedSegmentManager
or similar, and extend it tofetchChunk
,uploadSegment
(including upload log, indexes, and manifest) anddeleteSegment
.
- In this case, I'd rename the class to
I'm leaning towards the second option. Though, regardless, agreeing on either should help to scope this and the following PRs better. wdyt?
commons/src/main/java/io/aiven/kafka/tieredstorage/commons/ChunkManager.java
Show resolved
Hide resolved
commons/src/main/java/io/aiven/kafka/tieredstorage/commons/ChunkManager.java
Outdated
Show resolved
Hide resolved
@jeqo I totally agree regarding regarding your comment about having encryption/decryption and compression/decompression in the same place and was thinking about refactoring but I believe this can be addressed in other PRs and requires some discussions. For now I would proceed almost as is to finally get the first version working and then refactor this. |
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.
Sure, let's review it after URSM implementation is merged. Creating #207 to follow up.
@AnatolyPopov could you squash commits? I can merge it right after |
ee72bee
to
12c4678
Compare
@jeqo Done |
feat: adding ChunkManager implementation
Adding ChunkManager implementation that allows to fetch a specific chunk and return as decrypted and decompressed stream of bytes.