You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Andrew Gaul <no...@github.com> on 2013/08/28 21:00:46 UTC

[jclouds] Support Integer.MAX_VALUE size PUTs (#134)

Previously jclouds enforced Integer.MAX_VALUE - 1 size.  Tested
against Atmos Online.
You can merge this Pull Request by running:

  git pull https://github.com/maginatics/jclouds http-put-max-value

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds/pull/134

-- Commit Summary --

  * Support Integer.MAX_VALUE size PUTs

-- File Changes --

    M core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java (7)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/134.patch
https://github.com/jclouds/jclouds/pull/134.diff


Re: [jclouds] Support Integer.MAX_VALUE size PUTs (#134)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #648](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/648/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/134#issuecomment-23447200

Re: [jclouds] Support Integer.MAX_VALUE size PUTs (#134)

Posted by Andrew Gaul <no...@github.com>.
Closed #134.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/134

Re: [jclouds] Support Integer.MAX_VALUE size PUTs (#134)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #187](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/187/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/134#issuecomment-23447754

Re: [jclouds] Support Integer.MAX_VALUE size PUTs (#134)

Posted by BuildHive <no...@github.com>.
[jclouds ยป jclouds #362](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/362/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/134#issuecomment-23447141

Re: [jclouds] Support Integer.MAX_VALUE size PUTs (#134)

Posted by Andrew Phillips <no...@github.com>.
Looks good to me. +1

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/134#issuecomment-23445428

Re: [jclouds] Support Integer.MAX_VALUE size PUTs (#134)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #186](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/186/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/134#issuecomment-23442527

Re: [jclouds] Support Integer.MAX_VALUE size PUTs (#134)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #647](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/647/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/134#issuecomment-23442503

Re: [jclouds] Support Integer.MAX_VALUE size PUTs (#134)

Posted by Andrew Gaul <no...@github.com>.
> @@ -209,9 +209,10 @@ protected HttpURLConnection convert(HttpRequest request) throws IOException, Int
>              writePayloadToConnection(payload, "streaming", connection);
>           } else {
>              Long length = checkNotNull(md.getContentLength(), "payload.getContentLength");
> -            // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6755625
> -            checkArgument(length < Integer.MAX_VALUE,
> -                  "JDK 1.6 does not support >2GB chunks. Use chunked encoding, if possible.");
> +            checkArgument(length <= Integer.MAX_VALUE,
> +                  "JDK 1.6 does not support 2 GB or larger chunks." +
> +                  " Use chunked encoding or multi-part upload, if possible.");
> +            // Reference: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6755625

I saw a weird constant in my code while truing large file support across different providers.  Agreed we can remove this when moving to JDK 7 and I added a TODO.  I added a link to the error message and changed the wording slightly.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/134/files#r6044725

Re: [jclouds] Support Integer.MAX_VALUE size PUTs (#134)

Posted by Andrew Phillips <no...@github.com>.
> @@ -209,9 +209,10 @@ protected HttpURLConnection convert(HttpRequest request) throws IOException, Int
>              writePayloadToConnection(payload, "streaming", connection);
>           } else {
>              Long length = checkNotNull(md.getContentLength(), "payload.getContentLength");
> -            // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6755625
> -            checkArgument(length < Integer.MAX_VALUE,
> -                  "JDK 1.6 does not support >2GB chunks. Use chunked encoding, if possible.");
> +            checkArgument(length <= Integer.MAX_VALUE,
> +                  "JDK 1.6 does not support 2 GB or larger chunks." +
> +                  " Use chunked encoding or multi-part upload, if possible.");
> +            // Reference: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6755625

Wow, when did you run into this? Note that, when/if we move to Java 7, this limitation could be removed entirely. And how about referencing the bug in the error message?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/134/files#r6043288