Skip to content

Simplify the BlobContainer blob writing interface#13434

Merged
imotov merged 1 commit intoelastic:masterfrom
imotov:reverse-blob-write-interface
Sep 11, 2015
Merged

Simplify the BlobContainer blob writing interface#13434
imotov merged 1 commit intoelastic:masterfrom
imotov:reverse-blob-write-interface

Conversation

@imotov
Copy link
Copy Markdown
Contributor

@imotov imotov commented Sep 9, 2015

Instead of asking blob store to create output for posting blob content, this change provides that content of the blob to the blob store for writing. This will significantly simplify the interface for S3 and Azure plugins.

I will open separate PRs for changes in S3 and Azure plugins to keep things simple.

@imotov imotov added >enhancement review :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v2.1.0 v5.0.0-alpha1 labels Sep 9, 2015
@dadoonet
Copy link
Copy Markdown
Contributor

dadoonet commented Sep 9, 2015

I think you should do this in a single PR but you can add different commits in it.
I think it would be better to review the whole change and understand better the benefits.

I did not read in details for now but for sure it will simplify azure/s3 code!

@imotov
Copy link
Copy Markdown
Contributor Author

imotov commented Sep 10, 2015

@dadoonet I just want to mention that this PR is not going to break S3 and Azure plugin. I have added backward compatibility layer for them. My main concern is that if I will dump all the changes into a single PR I will have hard time finding someone, who would be able to review all this changes. So, I am just trying to make things simpler.

@dadoonet
Copy link
Copy Markdown
Contributor

Ok. I missed that it's backward compatible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

InputStream or OutputStream? This is confusing because the method is InputStream readBlob(String blobName)

@tlrx
Copy link
Copy Markdown
Member

tlrx commented Sep 10, 2015

@imotov I looked at the code, it's LGTM

I'm so so glad that you make this change, this will help a lot! Thank you so much

@dadoonet
Copy link
Copy Markdown
Contributor

I looked at the simplifications you mentioned for Azure and S3. I can easily find the added value for Azure as we don't need anymore to have AzureOutputStream but I think we will have to keep around almost all what we have for S3.

That being said, I'm +1 for the change as it simplifies the interface and what a plugin author has basically to provide.

Instead of asking blob store to create output for posting blob content, this change provides that content of the blob to the blob store for writing. This will significantly simplify the  interface for S3 and Azure plugins.
@imotov imotov force-pushed the reverse-blob-write-interface branch from 8366e42 to 39ca450 Compare September 11, 2015 20:42
@imotov imotov merged commit 39ca450 into elastic:master Sep 11, 2015
dadoonet added a commit to dadoonet/elasticsearch that referenced this pull request Nov 10, 2015
`AbstractLegacyBlobContainer` was kept for historical reasons (see elastic#13434).
We can migrate Azure and S3 repositories to use the new methods added in elastic#13434 so we can remove `AbstractLegacyBlobContainer` class.
@imotov imotov deleted the reverse-blob-write-interface branch May 1, 2020 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement v2.1.0 v5.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants