Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Andrew Gaul
Pushed to master as 539a9854c12514959264987d8a18e1cab40f2240. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/1251#issuecomment-432817751

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Andrew Gaul
Closed #1251. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/1251#event-1924564258

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Andrew Gaul
gaul approved this pull request. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/1251#pullrequestreview-168100745

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Andrew Gaul
gaul commented on this pull request. > @@ -878,7 +888,7 @@ public String completeMultipartUpload(MultipartUpload > mpu, List p setBlobAccess(mpu.containerName(), mpu.blobName(), mpu.putOptions().getBlobAccess()); - return eTag; + return mpuETag; Sorry I missed that this

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Timur Alperovich
timuralp commented on this pull request. > @@ -373,7 +376,13 @@ public Blob getBlob(final String container, final String > key) { if (attributes.contains(XATTR_CONTENT_MD5)) { ByteBuffer buf = ByteBuffer.allocate(view.size(XATTR_CONTENT_MD5));

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Timur Alperovich
timuralp commented on this pull request. > @@ -488,23 +498,37 @@ public String putBlob(final String containerName, final > Blob blob) throws IOExce String tmpBlobName = blobKey + "-" + UUID.randomUUID(); File tmpFile = getFileForBlobKey(containerName, tmpBlobName); Path

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Timur Alperovich
timuralp commented on this pull request. > @@ -115,6 +116,7 @@ private static final String XATTR_USER_METADATA_PREFIX = "user.user-metadata."; private static final byte[] DIRECTORY_MD5 = Hashing.md5().hashBytes(new byte[0]).asBytes(); + private static final String

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Timur Alperovich
timuralp commented on this pull request. > @@ -878,7 +888,7 @@ public String completeMultipartUpload(MultipartUpload > mpu, List p setBlobAccess(mpu.containerName(), mpu.blobName(), mpu.putOptions().getBlobAccess()); - return eTag; + return mpuETag; This will return an

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Timur Alperovich
timuralp commented on this pull request. >try { Files.createParentDirs(tmpFile); - his = new HashingInputStream(Hashing.md5(), payload.openStream()); - long actualSize = Files.asByteSink(tmpFile).writeFrom(his); + if (isMpu) { +inputStream =

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Timur Alperovich
timuralp commented on this pull request. > @@ -373,7 +376,13 @@ public Blob getBlob(final String container, final String > key) { if (attributes.contains(XATTR_CONTENT_MD5)) { ByteBuffer buf = ByteBuffer.allocate(view.size(XATTR_CONTENT_MD5));

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Timur Alperovich
timuralp commented on this pull request. >} + StringBuilder mpuETagBuilder = new StringBuilder("\""); + mpuETagBuilder.append(Hashing.md5().hashString(partHashes.toString(), US_ASCII).toString()); + mpuETagBuilder.append(String.format("-%d\"", parts.size())); +

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-24 Thread Timur Alperovich
timuralp commented on this pull request. > @@ -373,7 +376,13 @@ public Blob getBlob(final String container, final String > key) { if (attributes.contains(XATTR_CONTENT_MD5)) { ByteBuffer buf = ByteBuffer.allocate(view.size(XATTR_CONTENT_MD5));

Re: [jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-23 Thread Andrew Gaul
gaul requested changes on this pull request. This seems reasonable. CI may fail for unrelated reasons so please run these locally which I will also do before merging: ``` mvn verify -pl :filesystem mvn integration-test -pl :filesystem -Plive ``` > @@ -115,6 +116,7 @@ private static final

[jclouds/jclouds] JCLOUDS-1450: Use S3-style ETags for MPUs. (#1251)

2018-10-23 Thread Timur Alperovich
alongside the object). You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds/pull/1251 -- Commit Summary -- * JCLOUDS-1450: Use S3-style ETags for MPUs. -- File Changes -- M apis/filesystem/src/main/java/org/jclouds/filesystem/strateg