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

examples: Implement console progress bar for GetObject #554

Merged
merged 1 commit into from
Apr 16, 2017

Conversation

harshavardhana
Copy link
Member

Progress bar is of the following form

Uploading...    2% [=>                         ]   ...

Progress bar is of the following form

```
Uploading...    2% [=>                         ]   ...
```

// Get input stream to have content of 'my-objectname' from 'my-bucketname'
InputStream is = new ProgressStream("Downloading .. ", ProgressBarStyle.ASCII,
objectStat.length(), minioClient.getObject("my-bucketname", "my-objectname"));

Choose a reason for hiding this comment

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

Looks like this getObject() function does not yet exist in the latest deployed version?
I'm using this:

        <dependency>
            <groupId>io.minio</groupId>
            <artifactId>minio</artifactId>
            <version>3.0.3</version>
        </dependency>

Copy link
Member Author

Choose a reason for hiding this comment

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

Of course it does @danyaljj getObject has been implemented has been implemented in first release of minio-java.

What you are looking for is perhaps ProgressStream() - this is just an example you should copy paste the ProgressStream.java wherever needed and use it with inputStreams to generate progress bar.

Choose a reason for hiding this comment

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

what I mean is, getObject with two string parameters.

Choose a reason for hiding this comment

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

Oh no it's there. Found it.

@harshavardhana harshavardhana merged commit e777ab7 into minio:master Apr 16, 2017
@harshavardhana harshavardhana deleted the progressbar-get branch April 16, 2017 04:11
@AkshayAwate
Copy link

Can anyone tell me how to implement in python ? @harshavardhana

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.

5 participants