jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs-google] JCLOUDS-458:Added Blobstore Abstraction (#48)
Date Sat, 20 Sep 2014 03:28:38 GMT
> +         parts = (int) (length / unitPartSize);
> +      }
> +      if (parts > MultipartUpload.MAX_NUMBER_OF_PARTS) { // if still splits in too
many parts
> +         parts = MultipartUpload.MAX_NUMBER_OF_PARTS - 1; // limit them. do not care
about not
> +         // covering
> +      }
> +      long remainder = length % unitPartSize;
> +      if (remainder == 0 && parts > 0) {
> +         parts -= 1;
> +      }
> +      this.chunkSize = partSize;
> +      this.parts = parts;
> +      this.remaining = length - partSize * parts;
> +      logger.debug(" %d bytes partitioned in %d parts of part size: %d, remaining: %d%s",
length, parts, chunkSize,
> +               remaining, remaining > MultipartUpload.MAX_PART_SIZE ? " overflow!"
: "");
> +      return this.chunkSize;

Sorry...being lazy here...haven't reviewed the algo - is it copied from somewhere?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/48/files#r17817603
Mime
View raw message