-
Notifications
You must be signed in to change notification settings - Fork 8
MODEXPW-582:Replacing of custom AWS client by folio-s3-client library #700
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
base: master
Are you sure you want to change the base?
Conversation
|
| } | ||
|
|
||
| @Override | ||
| public String append(String path, InputStream newData) { |
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.
Hi @kjain110 , the append() method should not be used at all, as it has been deprecated in the library. The current implementation first downloads all the data, updates it, and then re-uploads everything, which is expected to be very slow. The main idea is to refactor the logic to completely eliminate the use of the append() method, since it would require different implementations for AWS S3 and Minio in both cases.
| } | ||
|
|
||
| public RemoteStorageWriter writer(String path) { | ||
| return getRemoteStorageWriter(path, 1024); |
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.
It will be useful to store 1024 as named constant.
| return client.write(sanitizePath(path), is); | ||
| } | ||
|
|
||
| public String write(String path, byte[] bytes) { |
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.
Is it possible to avoid operations with intermediate byte[] because this potentially leads to memory peaks and OOM as a result?


No description provided.