Skip to content
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

[#5243] Adding progress reporter to bulk operations #5730

Merged
merged 2 commits into from
Oct 9, 2019

Conversation

vhvb1989
Copy link
Member

@vhvb1989 vhvb1989 commented Oct 8, 2019

fixes: #5243

Wraps implementation for IProgressReceiver to trigger reportProgress on each upload/download step

  • adding a simple test and samples. More can be added after current release

* that this type be used in conjunction with {@link ProgressReporter#addProgressReporting(Flux, IProgressReceiver)}.
*/
interface IProgressReceiver {
public interface IProgressReceiver {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not a fan of interfaces starting with I. I would much prefer to see this called ProgressReceiver.

Copy link
Member Author

Choose a reason for hiding this comment

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

do we have any info about this in out guidance? for the preferred prefix-naming stuff?

I see a few interfaces doing the I.. naming within the project
image

Might be a good idea to have a docs with any agreement on this.

I don't really have any specific preference regarding to this. I am fine updating it :)

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I will update spec to say to not do this.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think there is any public API with the I prefix. If you do find any, please let me know.

@vhvb1989 vhvb1989 requested a review from JonathanGiles October 8, 2019 23:36
* @return A {@code Flux} that emits the same data as the source but calls a callback to report the total amount of
* data emitted so far.
*/
public static Flux<ByteBuffer> addParallelProgressReporting(Flux<ByteBuffer> data,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we want this method public. It's really for our own use when we handle parallel uploads

Copy link
Member Author

@vhvb1989 vhvb1989 Oct 9, 2019

Choose a reason for hiding this comment

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

we are using it from com.azure.storage.blob.specialized (BlobAsyncClientBase#download) and from com.azure.storage.blob (BlobAsyncClient:upload).

We would need to make some extra refactoring to have BlobAsyncClientBase in same package and then get rid of the public access

@vhvb1989 vhvb1989 merged commit 3a4043d into master Oct 9, 2019
@vhvb1989 vhvb1989 deleted the feat/#5243/progress-reporter branch October 9, 2019 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage Progress Reporting
4 participants