You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Timur Alperovich <no...@github.com> on 2015/08/19 23:55:51 UTC

[jclouds] JCLOUDS-992: Fix directory blob handling (#847)

Removes munging of directory blob names and does not conflate RELATIVE_PATH (typically used for common prefixes) with FOLDER (a storage type representing a directory blob). Implemented and tested the changes for Azure, S3, LocalBlobStore, and OpenStack-Swift.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * JCLOUDS-992: Handle directories as blobs in Swift.
  * JCLOUDS-992: Handle directories as blobs in S3.
  * JCLOUDS-992: Old Swift: treat directories as blobs
  * JCLOUDS-992: Handle directories as blobs in Azure.
  * JCLOUDS-992: Handle directories as blobs in HPCS.
  * JCLOUDS-992: remove special directory handling.
  * JCLOUDS-992: LocalBlobStore - use FOLDER for DIR.

-- File Changes --

    M apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/functions/ToBlobMetadata.java (5)
    M apis/s3/src/main/java/org/jclouds/s3/blobstore/functions/ObjectToBlobMetadata.java (15)
    M apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/functions/ObjectToBlobMetadata.java (17)
    M blobstore/src/main/java/org/jclouds/blobstore/domain/StorageType.java (18)
    D blobstore/src/main/java/org/jclouds/blobstore/strategy/IfDirectoryReturnNameStrategy.java (31)
    M blobstore/src/main/java/org/jclouds/blobstore/strategy/internal/DeleteAllKeysInList.java (6)
    M blobstore/src/main/java/org/jclouds/blobstore/strategy/internal/MarkerFileMkdirStrategy.java (2)
    D blobstore/src/main/java/org/jclouds/blobstore/strategy/internal/MarkersIfDirectoryReturnNameStrategy.java (50)
    M blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java (4)
    M providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/functions/BlobPropertiesToBlobMetadata.java (13)
    M providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/blobstore/functions/HPCloudObjectStorageObjectToBlobMetadata.java (6)

-- Patch Links --

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

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

Re: [jclouds] JCLOUDS-992: Fix directory blob handling (#847)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/847#event-388084694

Re: [jclouds] JCLOUDS-992: Fix directory blob handling (#847)

Posted by Timur Alperovich <no...@github.com>.
@andrewgaul I believe the file system blob store would not be able to pass this test, as it has the following behavior: blobs that end with "/" are treated as directories. The error above results when such a blob is created with content, as it can't associate the payload with the directory entry.

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

Re: [jclouds] JCLOUDS-992: Fix directory blob handling (#847)

Posted by Andrew Gaul <no...@github.com>.
@timuralp Have you run the filesystem integration tests?  I see failures in an S3Proxy test:

```
java.lang.IllegalArgumentException: Directory blob cannot have content: asdf/
        at org.jclouds.filesystem.strategy.internal.FilesystemStorageStrategyImpl.putDirectoryBlob(FilesystemStorageStrategyImpl.java:413) ~[s3proxy:1.5.0-SNAPSHOT]
        at org.jclouds.filesystem.strategy.internal.FilesystemStorageStrategyImpl.putBlob(FilesystemStorageStrategyImpl.java:444) ~[s3proxy:1.5.0-SNAPSHOT]
        at org.jclouds.blobstore.config.LocalBlobStore.putBlob(LocalBlobStore.java:535) ~[s3proxy:1.5.0-SNAPSHOT]
        at org.jclouds.blobstore.config.LocalBlobStore.putBlob(LocalBlobStore.java:747) ~[s3proxy:1.5.0-SNAPSHOT]
```

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

Re: [jclouds] JCLOUDS-992: Fix directory blob handling (#847)

Posted by Andrew Gaul <no...@github.com>.
Pushed to master as 2c417c83a6fe4d3c5fb9f864ba48f5255fbea6c1, a2d8dfcb277c2c5b5bf6c4f66475124724bf3c19, 238cc525f92d400fe919f79238ca9361553fbf24, 04ba8905f8639b0444a1439bcdba18cbaa0a3dd8, 5fcfcf3afe811eb2e43ad4fdfcb53e4b711e3545, 0c5a3db9dfa114a740cec3bb42733b1a5d1af6a2, and 3757a64abf7b93ca1d97b73b10cba42cb590455f.

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